[LETTERHEAD OF LATHAM & WATKINS]



                                 March 13, 2001


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


                  Re:      Registration Statement No. 333-56624;
                           $200,000,000 Aggregate Principal
                           Amount of Senior Secured Notes

Ladies and Gentlemen:

                  In connection with the registration of $200,000,000 [___]%
Senior Secured Notes due 2011 (the "Securities") by MidAmerican Funding, LLC, an
Iowa limited liability company (the "Registrant"), under the Securities Act of
1933, as amended, on Form S-3 filed with the Securities and Exchange Commission
(the "Commission") on March 6, 2001 (the "Registration Statement"), as amended
by Amendment No. 1 to the Registration Statement filed with the Commission on
March 13, 2001, you have requested our opinion with respect to the matters set
forth below.

                  In our capacity as your counsel in connection with such
registration, we are familiar with the proceedings taken and proposed to be
taken by the Registrant in connection with the authorization and issuance of the
Securities, and for the purposes of this opinion, have assumed such proceedings
will be timely completed in the manner presently proposed. In addition, we have
made such legal and factual examinations and inquiries, including an examination
of originals or copies certified or otherwise identified to our satisfaction of
such documents, corporate records and instruments, 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 oral or written
statements and representations of officers and other representatives of the
Registrant and others.




MidAmerican Funding, LLC
Page 2


                  We are opining herein as to the effect on the subject
transaction only of the internal laws of the State of New York, 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.

                  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, authenticated and
delivered by or on behalf of the Registrant against payment therefor in
accordance with the terms of the Indenture, dated as of March 11, 1999, as
supplemented by the First Supplemental Indenture dated as of March 11, 1999 and
the Second Supplemental Indenture dated as of March __, 2001 (the "Indenture"),
between the Registrant and The Bank of New York, as trustee (the "Trustee"), 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 relating to
the enforceability of the Securities are subject to the following exceptions,
limitations and qualifications: (i) the effect of bankruptcy, insolvency,
reorganization, moratorium 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.

                  We have not been requested to express, and with your knowledge
and consent do not render, any opinion as to the applicability to the
obligations of the Registrant under the Indenture and the Securities of Sections
547 and 548 of the United States Bankruptcy Code or applicable state law
(including, without limitation, Article 10 of the New York Debtor and Creditor
Law) relating to preferences and fraudulent transfers and obligations.

                  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) each of the Registrant and 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 Securities have
been duly authorized by all necessary limited liability company action of the
Registrant; (iii) the Indenture is the legally valid, binding and enforceable
obligation of the Trustee, enforceable against the Trustee in accordance with
its terms; and (iv) 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 Funding, 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 contained in the Registration
Statement.

                                                     Very truly yours,

                                                     /s/ Latham & Watkins