Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the reference to our firm under the caption “Experts” in the Registration Statement onForm F-3 and related Prospectus of BP p.l.c., BP Capital Markets America Inc. and BP Capital Markets p.l.c. for the registration of debt securities fully and unconditionally guaranteed by BP p.l.c. and to the incorporation by reference therein of our reports dated March 29, 2018, with respect to the group financial statements of BP p.l.c., and the effectiveness of internal control over financial reporting of BP p.l.c., included in its Annual Report on Form20-F for the year ended December 31, 2017, filed with the Securities and Exchange Commission.
/s/ Ernst & Young LLP
Ernst & Young LLP
London, England
August 1, 2018