Exhibit 5.1

| | |
| | Mayer Brown LLP 71 South Wacker Drive Chicago, Illinois 60606-4637 |
| |
June 20, 2018 | | Main Tel (312)782-0600 Main Fax (312)701-7711 www.mayerbrown.com |
Ally Auto Assets LLC
Corporation Trust Center
1209 Orange Street
Wilmington, Delaware 19801
| Registration Statement on FormSF-3 (No.333-204844) |
Ladies and Gentlemen:
We have acted as special counsel to Ally Bank and Ally Auto Assets LLC, a Delaware limited liability company (the “Seller”), in connection with the above-captioned registration statement (the “Registration Statement”) and the offering of theClass A-1 Asset Backed Notes, theClass A-2 Asset Backed Notes, theClass A-3 Asset Backed Notes and theClass A-4 Asset Backed Notes (other than such Notes retained by the Seller or another majority-owned affiliate of Ally Bank) (collectively, the “Offered Notes”) and the issuance of the Class B Asset Backed Notes, the Class C Asset Backed Notes, the Class D Asset Backed Notes and the other Notes retained by the Seller or another majority-owned affiliate of Ally Bank (together with the Offered Notes, the “Notes”) described in the final prospectus dated June 19, 2018 (the “Prospectus”), which has been filed with the Securities and Exchange Commission (the “Commission”) pursuant to Rule 424(b) under the Securities Act of 1933, as amended (the “Act”). As described in the Prospectus, the Notes will be issued by Ally Auto Receivables Trust2018-3 (the “Issuing Entity”), a trust formed by the Seller pursuant to a trust agreement (as amended, restated or otherwise modified, the “Trust Agreement”) between the Seller and BNY Mellon Trust of Delaware, as owner trustee and paying agent. The Notes will be issued pursuant to an indenture (the “Indenture”) between the Issuing Entity and Deutsche Bank Trust Company Americas, as indenture trustee.
In that connection, we are generally familiar with the proceedings taken or to be taken in connection with the proposed authorization, issuance and sale of the Offered Notes, and have examined and relied upon copies of such statutes, documents, corporate records and other instruments as we have deemed necessary or appropriate for the purposes of this opinion, including the Prospectus and current drafts of the Indenture (including the form of the Offered Notes included as an exhibit thereto) and the Trust Agreement.
Mayer Brown LLP operates in combination with other Mayer Brown entities, which have offices in North America, Europe and Asia and are associated with Tauil & Chequer Advogados, a Brazilian law partnership.
Mayer Brown LLP
Ally Auto Assets LLC
June 20, 2018
Page 2
Based on and subject to the foregoing, we are of the opinion that, with respect to the Offered Notes, when (a) the Indenture has been duly qualified under the Trust Indenture Act of 1939, as amended, (b) the Offered Notes have been duly executed and issued by the Issuing Entity and authenticated by the Indenture Trustee and (c) payment of the agreed consideration for the Offered Notes has been received by the Issuing Entity, such Offered Notes will have been duly authorized by all necessary action of the Issuing Entity and will be legally issued and binding obligations of the Issuing Entity and entitled to the benefits afforded by the Indenture, except as may be limited by bankruptcy, insolvency, reorganization, arrangement, moratorium or other laws relating to or affecting creditors’ rights generally (including, without limitation, fraudulent conveyance laws), and by general principles of equity, regardless of whether such matters are considered in a proceeding in equity or at law.
Mayer Brown LLP
Ally Auto Assets LLC
June 20, 2018
Page 3
Our opinions expressed herein are limited to the federal laws of the United States and the laws of the State of New York and the Delaware Statutory Trust Act. We hereby consent to the filing of this opinion with the Commission as Exhibit 5.1 to a Form8-K filed in connection with the Prospectus and to the use of our name therein without admitting we are “experts” within the meaning of the Act or the rules and regulations of the Commission issued thereunder, with respect to any part of the Registration Statement or the Prospectus.
Very truly yours,
/s/ Mayer Brown LLP
MAYER BROWN LLP