EXHIBIT 5.1 OPINION OF LATHAM WATKINS [LETTERHEAD] October 27,1998 Realty Income Corporation 220 West Crest Street Escondido, California 92025 Re: Registration Statement No. 333-34311; up to $115,000,000 AGGREGATE PRINCIPAL AMOUNT OF 8 1/4% MONTHLY INCOME SENIOR NOTES DUE 2008 Ladies and Gentlemen: We have acted as special counsel to you in connection with the issuance of up to $115,000,000 aggregate principal amount of 8 1/4% Monthly Income Senior Notes due 2008 (the "Securities"), pursuant to a registration statement on Form S-3 under the Securities Act of 1933, as amended (the "1933 Act"), filed with the Securities and Exchange Commission (the "Commission") on August 25, 1997 (File No. 333-34311), as amended by Amendment No. 1 filed with the Commission on September 16, 1997 (as so amended, the "Registration Statement") and a prospectus supplement dated October 23, 1998 and a related prospectus dated October 1, 1997 (collectively the "Prospectus"). Except as otherwise expressly indicated, the terms Registration Statement and Prospectus shall include all documents incorporated by reference therein. As such 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 oral or written statements and representations of officers and other representatives of the Company and others. In addition, we have obtained and relied upon such certificates and assurances from public officials as we have deemed necessary. 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. Various issues concerning Maryland law are addressed in the opinion of Ballard Spahr Andrews & Ingersoll, LLP, which has been separately provided to you, and we express no opinion with respect to those matters. Capitalized terms used herein without definition have the meanings assigned to them in the Purchase Agreement. Subject to the foregoing and the other matters set forth herein, it is our opinion that, as of the date hereof: 1. Assuming the due authorization, execution and delivery of the Indenture by the Company under the laws of the State of Maryland and the due authorization, execution and delivery of the Indenture by the Trustee, the Indenture constitutes a valid and binding agreement of the Company, enforceable against the Company in accordance with its terms. 2. Assuming the due authorization and execution of the Securities by the Company under the laws of the State of Maryland, the Securities, when authenticated by the Trustee in the manner provided in the Indenture (assuming the due authorization, execution and delivery of the Indenture by the Trustee) and delivered against payment of the purchase price therefor specified in the Purchase Agreement, the Securities will constitute valid and binding obligations of the Company, enforceable against the Company in accordance with their terms. The opinions rendered in the foregoing paragraphs relating to the enforceability of the Indenture and the Securities, respectively, 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; (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; (iii) the unenforceability under certain circumstances under law or court decisions of provisions providing for the indemnification of or contribution to a party with respect to a liability where such indemnification or contribution is contrary to public policy; (iv) we express no opinion concerning the enforceability of the waiver of rights or defenses contained in Section 514 of the Indenture; and (v) we express no opinion with respect to whether acceleration of the Securities may affect the collectibilityof that portion of the stated principal amount thereof which might be determined to constitute unearned interest thereon. To the extent that the obligations of the Company under the Indenture may be dependent upon such matters, we assume for purposes of this opinion that the Trustee under the Indenture is duly organized, validly existing and in good standing under the laws of its jurisdiction of organization; that the Trustee has complied with any applicable requirement to file returns and pay taxes under the Franchise Tax Law of the State of California; that the Trustee is duly qualified to engage in the activities contemplated by the Indenture; that the Indenture has been duly authorized, executed and delivered by the Trustee and constitutes a legally valid, binding and enforceable obligation of the Trustee enforceable against the Trustee in accordance with its terms; and the Trustee is in compliance, generally and with respect to acting as trustee under the Indenture, with all applicable laws and regulations; and that the Trustee has the requisite organizational and legal power and authority to perform its obligations under the Indenture. We consent to your filing this opinion as an exhibit to a current report on Form 8-K and to the reference to our firm in the prospectus supplement dated October 23, 1998 contained under the heading "Legal Matters." Very truly yours, /s/ LATHAM & WATKINS