Back to Contents

**Exhibit  23.1**

**CONSENT  OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM**

We consent to the incorporation by reference in the Registration Statements on Form F-3 (File Nos. 333-149313, 333-170848 and 333-172317) of (a) our report dated March 8, 2012 (except forNotes 12, 13, 14, 16 and 17, as to which the date is May 15, 2012) relating to the consolidated financial statements of YPF Sociedad Anónima (“YPF” or the “Company”) (which report expresses an unqualified opinion andincludes explanatory paragraphs stating that: (i) as indicated in Note 17 to the consolidated financial statements, on April 16, 2012, Decree No. 530/12 of the National Executive Power, provided for the temporary intervention of YPF for a period of30 days. Furthermore, on April 23, 2012, the Intervenor decided to suspended, until further notice, the Shareholders’ meeting to be held on April 25, 2012, that should have considered, among other things, the financial statements as of December31, 2011 prepared under accounting principles generally accepted in Argentina filed with the Comisión Nacional de Valores (Argentine Securities Commission) and approved by the Board of Directors of the Company on March 8, 2012; (ii) asindicated in Note 17 to the consolidated financial statements, on May 4, 2012, Law No. 26,741 was enacted providing for the expropriation by the Argentine Government of 51% of the equity held until such date by Repsol YPF, S.A. A significant portionof the Company’s financial debt amounting to approximately US$ 2 billion as of December 31, 2011, provides that changes in the Company’s control and/or nationalization constitute an event of default. In addition, the outstanding financialindebtedness also contains cross-default provisions and/or cross-acceleration provisions that could cause all of the debt to be accelerated if the debt having changes in control and/or nationalization events provisions goes into default or isaccelerated; (iii) as indicated in Note 17 to the consolidated financial statements, during 2012 certain provinces of Argentina have revoked and/or have commenced proceedings to revoke some oil and gas production concessions; (iv) the accountingprinciples generally accepted in Argentina vary in certain significant respects from accounting principles generally accepted in the United States of America and that the information relating to the nature and effect of such differences is presentedin Notes 12, 13, and 14 to the consolidated financial statements, and v) as indicated in Note 1 to the consolidated financial statements, the Company will be adopting the International Financial Reporting Standards as issued by the IASB(International Auditing Standard Board) (“IFRS”) as from the fiscal year beginning on January 1, 2012, with transition date on January 1, 2011 and information relating the effects of such transition to IFRS is presented in Note 16 to theconsolidated financial statements, which also indicates that items and amounts contained in the reconciliations included in that note are subject to the changes that might occur as a result of modifications introduced to the IFRS that will beapplied, and that such items and amounts will be considered definitive only when preparing the financial statements for the year ending on December 31, 2012), and (b) our report dated March 8, 2012 (except for the procedures relating to the testingand evaluation of the controls over the preparation of the US GAAP financial information shown in Notes 12, 13 and 14, as to which the date is May 15, 2012) relating to the effectiveness of YPF’s internal control over financial reporting,appearing in the Annual Report on Form 20-F of YPF for the year ended December 31, 2011 (which expresses an unqualified opinion and includes an explanatory paragraph stating that, as stated in Management’s Report on Internal Control overFinancial Reporting (Item 15 of the 2011 Form 20-F), pursuant to Decree No. 530/12 of the National Executive Power enacted on April 16, 2012, during the temporary intervention of the Company, all powers, duties and responsibilities of the Board ofDirectors, the Audit Committee and the Disclosure Committee of the Company have been transferred to the Argentine government-appointed Intervenor. Therefore, since such date, the Board of Directors, the Audit Committee and the Disclosure Committeeare no longer in effect).

Buenos Aires  City, Argentina  May 15, 2012 

Deloitte & Co. S.R.L. 

/S/ Diego  O. De Vivo          Diego O. De Vivo  Partner 

----