[GOODWIN, PROCTER & HOAR LLP Letterhead] May 18, 1998 Meditrust Corporation 197 First Avenue, Suite 300 Needham Heights, MA 02194 Meditrust Operating Company 197 First Avenue, Suite 100 Needham Heights, MA 02194 Re: Legality of Securities to be Registered under Registration Statement on Form S-4 ---------------------------------------- Ladies and Gentlemen: We have acted as counsel for Meditrust Corporation, a Delaware corporation ("Meditrust"), and Meditrust Operating Company, a Delaware corporation ("Operating Company" and, together with Meditrust, the "Companies"), in connection with the merger of La Quinta Inns, Inc., a Texas corporation ("La Quinta"), with and into Meditrust with Meditrust being the surviving corporation (the "Merger"), pursuant to the Agreement and Plan of Merger among the Companies and La Quinta dated as of January 3, 1998, as amended (the "Merger Agreement"). Upon consummation of the Merger, Meditrust will be issuing shares of its common stock, par value $.10 per share, and Operating Company will be issuing shares of its common stock, par value $.10 per share. The shares of Meditrust common stock and Operating Company common stock are paired and trade as a single unit (the "Paired Shares"). The Paired Shares issued in connection with the Merger are collectively referred to herein as the "Registered Shares." In connection with the Merger, the Companies have filed a registration statement on Form S-4 (the "Registration Statement") pursuant to the Securities Act of 1933, as amended, which Registration Statement covers all of the Registered Shares. In connection with rendering this opinion, we have examined the Restated Certificates of Incorporation of each of the Companies as on file with the Secretary of State of the State of Delaware, the By-laws, as amended and restated, of each of the Companies, such records of the corporate proceedings of the Companies as were deemed material, the Registration Statement and the exhibits thereto, and such other certificates, receipts, records and documents as we considered necessary for the purposes of this opinion. In our examination, we have assumed the genuineness of all signatures, the legal capacity of natural persons, the authenticity of all documents submitted to us as certified, photostatic or facsimile copies, the authenticity of the originals of such copies and the authenticity of telephonic confirmations of public officials and others. As to facts material to our opinion, we have relied upon certificates or telephonic confirmations of public officials and certificates, documents, statements and other information of the Companies or representatives or officers thereof. We are attorneys admitted to practice in the Commonwealth of Massachusetts. We express no opinion concerning the laws of any jurisdictions other than the laws of the United States of America and the Delaware General Corporation Law, and also express no opinion with respect to the blue sky or securities laws of any state, including Delaware. Based upon the foregoing, we are of the opinion that under the Delaware General Corporation Law, pursuant to which the Companies were incorporated, upon the issuance of the Registered Shares in accordance with the terms of the Merger Agreement, the Registered Shares will be duly authorized, validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to us with respect to this opinion under the heading "Legal Matters" in the Prospectus which is a part of such Registration Statement. Very truly yours, /s/ Goodwin, Procter & Hoar LLP Goodwin, Procter & Hoar LLP