[LATHAM & WATKINS LETTERHEAD]



                                January 11, 2000

                                                                     EXHIBIT 5.1

MidAmerican Funding, LLC
666 Grand Avenue
Des Moines, Iowa 50303

                  Re:      Registration Statement on Form S-4;
                           $700,000,000 Aggregate Principal
                           Amount of Senior Secured Notes and Bonds

Ladies and Gentlemen:

                  In connection with the registration of (i) $200,000,000 5.85%
Senior Secured Exchange Notes due 2001 (the "2001 Securities"), (ii)
$175,000,000 6.339% Senior Secured Exchange Notes due 2009 (the "2009
Securities") and (iii) $325,000,000 6.927% Senior Secured Exchange Bonds due
2029 (the "2029 Securities" and, collectively with the 2001 Securities and the
2009 Securities, the "Securities") by MidAmerican Funding, LLC, an Iowa limited
liability company (the "Registrant"), under the Securities Act of 1933, as
amended, on Form S-4 filed with the Securities and Exchange Commission (the
"Commission") on November 8, 1999, as amended by Amendment No. 1 thereto filed
with the Commission on December 16, 1999 and Amendment No. 2 thereto filed with
the Commission on January 11, 2000 (the "Registration Statement"), you
have requested our opinion with respect to the matters set forth below.

                  In our capacity as your special counsel, we have made such
legal and factual examinations and inquiries as we have deemed necessary or
appropriate for purposes of this opinion.

                  In our examination, we have assumed the genuineness of all
signatures, the authenticity of all documents submitted to us as originals, and
the conformity to authentic original documents of all documents submitted to us
as copies. As to facts material to the opinions, statements and assumptions
expressed herein, we have, with your consent, relied upon




MidAmerican Finding, LLC
Page 2


oral or written statements and representations of officers and other
representatives of the Registrant and others.

                  We are opining herein as to the effect on the subject
transaction only of the internal laws of the State of New York, including
statutory and reported decisional law thereunder, and we express no opinion with
respect to the applicability thereto, or the effect thereon, of the laws of any
other jurisdiction or as to any matters of municipal law or the laws of any
local agencies within any state.

                  Capitalized terms used herein without definition have the
meanings assigned to them in the Registration Statement.

                  Subject to the foregoing and the other matters set forth
herein, it is our opinion that as of the date hereof:

                  When the Securities have been duly executed, issued,
authenticated and delivered by or on behalf of the Registrant, the Securities
will constitute legally valid and binding obligations of the Registrant,
enforceable against the Registrant in accordance with their terms.

                  The opinions rendered in the preceding paragraph are subject
to the following exceptions, limitations and qualifications: (i) the effect of
bankruptcy, insolvency, reorganization, moratorium, fraudulent conveyance or
other similar laws now or hereafter in effect relating to or affecting the
rights and remedies of creditors; and (ii) the effect of general principles of
equity, whether enforcement is considered in a proceeding in equity or law, and
the discretion of the court before which any proceeding therefor may be brought.

                  To the extent that the obligations of the Registrant under the
Indenture may be dependent upon such matters, we assume for purposes of this
opinion that: (i) the Trustee (a) is duly organized, validly existing and in
good standing under the laws of its jurisdiction of organization, (b) has the
requisite organizational and legal power and authority to perform its
obligations under the Indenture and the Securities, (c) is duly qualified to
engage in the activities contemplated by the Indenture and (d) has duly
authorized, executed and delivered the Indenture; (ii) the Indenture is the
legally valid, binding and enforceable obligation of the Trustee, enforceable
against the Trustee in accordance with its terms; and (iii) the Trustee is in
compliance, generally and with respect to acting as a trustee under the
Indenture, with all applicable laws and regulations. We have also assumed, with
your




MidAmerican Finding, LLC
Page 3


consent, that the choice of law provisions in the Indenture would be enforced by
any court in which enforcement thereof might be sought.

                  We consent to your filing this opinion as an exhibit to the
Registration Statement and to the reference to our firm contained under the
heading "Legal Matters" in the Prospectus.




                                             Very truly yours,

                                             /s/ Latham & Watkins
                                             -------------------------------
                                                 Latham & Watkins