Exhibit 5.1

| | |
August 9, 2018 | | Mayer Brown LLP 71 South Wacker Drive Chicago, Illinois 60606-4637 Main Tel (312) 782-0600 Main Fax (312) 701-7711 www.mayerbrown.com |
Ally Wholesale Enterprises LLC
Corporation Trust Center
1209 Orange Street
Wilmington, Delaware 19801
Re: | Ally Master Owner Trust, Series2018-4 |
Registration Statement on FormSF-3 (No.333-206413)
Ladies and Gentlemen:
We have acted as special counsel to Ally Bank, Ally Wholesale Enterprises LLC (the “Depositor”) and Ally Financial Inc. (“Ally Financial”) in connection with the above-captioned registration statement (the “Registration Statement”) and the offering of the Class A Asset Backed Notes (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 Class E Asset Backed Equity Notes (together with the Offered Notes, the “Notes”) described in the final prospectus dated August 7, 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 Master Owner Trust (the “Issuing Entity”), a trust formed by the Depositor pursuant to that certain trust agreement, dated as of February 12, 2010 (as amended, restated or otherwise modified, the “Trust Agreement”), among the Depositor, U.S. Bank Trust National Association (as successor to HSBC Bank USA, National Association), as owner trustee, and U.S. Bank Trust National Association (as successor to HSBC Trust Company (Delaware), National Association), as Delaware trustee. The Notes will be issued on or about August 15, 2018 pursuant to an indenture supplement (the “Indenture Supplement”) to an Indenture, dated as of February 12, 2010 (the “Base Indenture” and, together with the Indenture Supplement, the “Indenture”), each between the Issuing Entity and Wells Fargo Bank, National Association, as indenture trustee (the “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 Registration Statement, the Prospectus, the Trust Agreement, the Base Indenture and a current draft of the Indenture Supplement (including the form of the Offered Notes included as an exhibit thereto).
Mayer Brown LLP operates in combination with other Mayer Brown entities (the “Mayer Brown Practices”), which have offices in North America,
Europe and Asia and are associated with Tauil & Chequer Advogados, a Brazilian law partnership.