Exhibit 5.1

| Dewey & LeBoeuf LLP 1301 Avenue of the Americas New York, NY 10019-6092 |
| tel + fax + | 1 212 259 8000 1 212 259 6333 |
| www.dl.com |
March 25, 2008
MidAmerican Energy Company
666 Grand Avenue, Suite 500
Des Moines, Iowa 50309-2580
| Re: | MidAmerican Energy Company (the “Company”) $350,000,000 5.30% Senior Notes due 2018 |
Ladies and Gentlemen:
We have acted as counsel to MidAmerican Energy Company, an Iowa corporation (the “Company”), in connection with the issuance by the Company of $350,000,000 in aggregate principal amount of its 5.30% Senior Notes due 2018 (the “Senior Notes”) to be issued pursuant to the Indenture, dated as of October 1, 2006 (the “Base Indenture”), between the Company and the Bank of New York Trust Company, N.A., as trustee (the “Trustee”), as supplemented by the Third Supplemental Indenture, to be dated as of March 25, 2008 (the “Third Supplemental Indenture”) and the sale of the Notes by the Company to the Underwriters, for whom Lehman Brothers Inc. and Greenwich Capital Markets, Inc. are acting as Representatives, pursuant to the Underwriting Agreement, dated March 19, 2008 (the “Underwriting Agreement”), among the Company and the Underwriters. All terms not otherwise defined herein shall have the meanings ascribed to them in the Underwriting Agreement.
In connection therewith, we have examined (i) the registration statement on Form S-3ASR (File No. 333-142663) filed on May 7, 2007, (the “Registration Statement”), (ii) the Prospectus dated May 7, 2007, (iii) the Prospectus Supplement, dated March 19, 2008, (iv) the Free Writing Prospectus, dated March 19, 2008, (v) an executed copy of the Underwriting Agreement, (vi) the Base Indenture, (vii) the form of Third Supplemental Indenture, (viii) form of the Senior Notes and (ix) the resolutions of the directors of the Company, duly adopted at a meeting duly held on March 19, 2008 at which a quorum was present (collectively, the “Transaction Documents”).
NEW.YORK | LONDON.MULTINATIONAL.PARTNERSHIP | WASHINGTON,.DC
ALBANY | ALMATY | AUSTIN | BEIJING | BOSTON | BRUSSELS | CHARLOTTE | CHICAGO | DUBAI
EAST.PALO.ALTO | FRANKFURT | .HARTFORD | .HONG.KONG .| .HOUSTON | JACKSONVILLE .| .JOHANNESBURG (PTY).LTD.
LOS.ANGELES | MILAN | MOSCOW | PARIS.MULTINATIONAL.PARTNERSHIP | RIYADH.AFFILIATED.OFFICE | ROME | SAN.FRANCISCO | WARSAW
March 25, 2008
Page 2
In such examination, we have assumed, without inquiry, the legal capacity of all natural persons, the genuineness of all signatures on all documents examined by us, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as facsimile, electronic, certified/or photostatic copies and the authenticity of such originals. We have also assumed that the books and records of the Company are maintained in accordance with proper corporate procedures. As to any facts material to the opinions expressed herein that we did not independently establish or verify, we have relied upon the aforesaid agreements, instruments, certificates, documents and records and upon statements and certificates of officers and other representatives of the Company and of public officials.
Based upon and subject to the foregoing, and subject to the further limitations, qualifications and assumptions set forth below, we are of the opinion that:
The Notes have been duly authorized and when they have been duly executed, authenticated, issued and delivered in accordance with the Underwriting Agreement, the Base Indenture and the Third Supplemental Indenture, will constitute valid and legally binding obligations of the Company entitled to the benefits provided by the Indenture.
The opinion expressed herein is subject to the effects of (i) bankruptcy, insolvency, reorganization, fraudulent conveyance, moratorium and other similar laws now or hereafter in effect affecting creditors’ rights generally; (ii) general principles of equity (regardless of whether such principles are considered in a proceeding in law or equity) and (iii) an implied covenant of good faith, reasonableness and fair dealing, and standards of materiality.
The opinions expressed herein are limited to the laws of the State of New York.
March 25, 2008
Page 3
We consent to the filing of this opinion as an exhibit to the Company’s Current Report on Form 8-K dated March 24, 2008, which is incorporated by reference into the Registration Statement and the Prospectus, and to the use of our name under the caption “Experts” contained in the Prospectus. In giving our consent, we do not thereby concede that we come within the category of persons whose consent is required by the Securities Act or the Rules and Regulations promulgated thereunder.
| | | Very truly yours, |
| | | /s/ Dewey & LeBoeuf LLP |
| | | |