Exhibit 5.1

Writer’s Direct Dial: +1 212 225-2758
Email: jjuantorena@cgsh.com
September 6, 2022
Petróleos Mexicanos
Avenida Marina Nacional No. 329
Colonia Verónica Anzures
Alcaldía Miguel Hidalgo
11300 Ciudad de México
México
Registration Statement on Form F-4
Ladies and Gentlemen:
We have acted as your special United States counsel in connection with the above-referenced Registration Statement on Form F-4 (the “Registration Statement”) filed on the date hereof by Petróleos Mexicanos (the “Issuer”) and Pemex Exploración y Producción, Pemex Transformación Industrial and Pemex Logística (collectively, the “Guarantors”), with the United States Securities and Exchange Commission (the “Commission”) pursuant to the Securities Act of 1933, as amended (the “Act”), in connection with the proposed offer to exchange (the “Exchange Offer”) up to U.S. $1,984,688,669 aggregate principal amount of 8.750% Notes due 2029 (the “New Securities”) that have been registered under the Act for an equal principal amount of the Issuer’s issued and outstanding 8.750% Notes due 2029 (the “Old Securities”). The New Securities will be issued pursuant to an indenture dated as of January 27, 2009, between the Issuer and Deutsche Bank Trust Company Americas, as trustee (the “Trustee”), as supplemented by (i) the First Supplemental Indenture, dated as of June 2, 2009, among the Issuer, the Trustee and Deutsche Bank AG, London Branch as International Paying and Authenticating Agent, (ii) the Second Supplemental Indenture, dated as of October 13, 2009, among the Issuer, the Trustee, Credit Suisse AG, as Principal Swiss Paying Agent and Authenticating Agent, and BNP Paribas (Suisse) SA, as Swiss Paying Agent, (iii) the Third Supplemental Indenture, dated as of April 10, 2012, among the Issuer, the Trustee and Credit Suisse AG, as Swiss Paying Agent and Authenticating Agent, (iv) the Fourth Supplemental Indenture, dated as of June 24, 2014, between the Issuer and the Trustee, (v) the Fifth Supplemental Indenture, dated as of October 15, 2014, between the Issuer and the Trustee, (vi) the Sixth Supplemental Indenture, dated as of December 8, 2015, among the Issuer, the Trustee, BNP Paribas (Suisse) SA, as Principal Swiss Paying Agent and Authenticating Agent, and Credit Suisse AG, as Swiss Paying Agent, (vii) the Seventh Supplemental Indenture, dated as of June 14, 2016, among the Issuer, the Trustee, Credit Suisse AG, as Principal Swiss Paying Agent and Authentication Agent, and UBS AG, as Swiss Paying Agent, (viii) the Eighth Supplemental Indenture, dated as of February 16, 2018, between the Issuer and the Trustee and (ix) the Ninth Supplemental Indenture, dated as of June 4, 2018, among the Issuer, the Trustee, BNP Paribas (Suisse), as Principal Swiss Paying and Authentication Agent, and UBS AG, as Swiss Paying Agent (as supplemented, the “Indenture”). Pursuant to a guaranty agreement dated July 29, 1996 (the “Guaranty Agreement”) among the Issuer and the Guarantors, and certificates of designation dated June 1, 2022 (the “Certificates of Designation”) issued by the Issuer thereunder, all of the Issuer’s payment obligations under the New Securities will be unconditionally guaranteed, jointly and severally, by the Guarantors.
