EXHIBIT 5.2 [Piper & Marbury Letterhead] February 10, 1998 America First Mortgage Investments, Inc. 1004 Farnam Street Omaha, Nebraska 68102 REGISTRATION STATEMENT ON FORM S-4 Ladies and Gentlemen: We have acted as Maryland counsel to America First Mortgage Investments, Inc., a Maryland corporation (the "Company"), in connection with the registration under the Securities Act of 1933, as amended, pursuant to a Registration Statement on Form S-4 of the Company (the "Registration Statement") filed with the Securities and Exchange Commission, of an aggregate of 8,971,506 shares (the "Shares") of the Company's Common Stock, par value $.01 per share. The Shares have been or may be issued by the Company in the event Unitholders representing a majority of the outstanding Units in each of America First Participating/Preferred Equity Mortgage Fund Limited Partnership, a Delaware limited partnership ("Prep Fund 1"), America First Prep Fund 2 Limited Partnership, a Delaware limited partnership ("Prep Fund 2"), and America First Prep Fund 2 Pension Series Limited Partnership, a Delaware limited partnership ("Pension Fund"), vote to approve the Merger (as hereinafter defined). The Merger will be effected pursuant to an Agreement and Plan of Merger, dated July 29, 1997 (the "Merger Agreement"), which contemplates (a) the merger of Prep Fund 1 and Prep Fund 2 with and into the Company and (b) the merger of Pension Fund with AF Merger, L.P., a Delaware limited partnership, which will survive the Merger becoming a subsidiary of the Company (collectively, (a) and (b) shall be referred to herein as the "Merger"). Capitalized terms used herein and not otherwise defined herein shall have the meanings ascribed to them in the Consent Solicitation Statement/Prospectus of Prep Fund 1, Prep Fund 2, and Pension Fund (the "CSS/P"). In our capacity as Maryland counsel to the Company, we have examined (i) the Charter and By-Laws of the Company, (ii) minutes of proceedings of the Company relating to its organization, authorizing the issuance of the Shares, and authorizing (including authorizing the execution and delivery of) the Merger Agreement and the transactions contemplated thereby, (iii) the Registration Statement, (iv) the CSS/P, (v) the Merger Agreement, (vi) a Certificate of Secretary of the Company dated the date hereof (the "Certificate"), (vii) a good standing certificate, dated a recent date, issued by the Maryland State Department of Assessments and Taxation (the "Department"), and (viii) such other documents as we have considered necessary. In such examination, we have assumed, without independent investigation, the genuineness of all signatures, the legal capacity of all individuals who have executed any of the aforesaid documents, the authenticity of all documents submitted to us as originals, the conformity with originals of all documents submitted to us as copies (and the authenticity of the originals of such copies), and that all public records reviewed are accurate and complete. As to factual matters we have relied on the Certificate and have not independently verified the matters stated therein. Based upon the foregoing and having regard for such legal considerations as we deem relevant, we are of the opinion and so advise you that upon the issuance and delivery of the Shares in accordance with the terms set forth in the CSS/P which forms part of the Registration Statement and the Merger Agreement, and assuming the Articles of Merger relating to the Merger are filed with, and accepted by, the Department, the Shares will be validly issued, fully paid, and non-assessable. The opinion expressed herein is for the use of the Company in connection with the Registration Statement. In addition, Rogers & Wells may rely on this opinion to give their opinion to the Company in connection with the Registration Statement. This opinion is limited to the matters set forth herein, and no other opinion should be inferred beyond the matters expressly stated. America First Mortgage Investments, Inc. February 10, 1998 Page 2 We hereby consent to the filing of this opinion as an exhibit to the Registration Statement of the Company to be filed on the date hereof. Very truly yours, /s/ Piper & Marbury L.L.P.