[COOLEY GODWARD LLP LETTERHEAD] EXHIBIT 5.1 August 12, 2003 Gladstone Commercial Corporation 1750 Tysons Boulevard, 4th Floor McLean, VA 22102 Ladies and Gentlemen: You have requested our opinion with respect to certain matters in connection with the filing by Gladstone Commercial Corporation (the "Company") of a Registration Statement on Form S-11 (Registration No. 333-_______) (the "Registration Statement") with the Securities and Exchange Commission (the "Commission") pursuant to Rule 462(b) under the Securities Act of 1933, as amended (the "Act") with respect to the registration of 1,265,000 shares of common stock pursuant to the Registration Statement (the "Shares"). In connection with this opinion, we have examined and relied upon the Registration Statement and related prospectus, the Company's Articles of Incorporation and Bylaws, as currently in effect, and the originals or copies certified to our satisfaction of such records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below and we have assumed that the Shares will be sold by the underwriters at a price established by the pricing committee of the Board of Directors of the Company. Our opinion is expressed only with respect to the laws of the State of Maryland. On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Shares, when sold and issued by the Company in the manner contemplated by the Registration Statement and related prospectus, will be validly issued, fully paid and non-assessable. We consent to the reference to our firm under the caption "Legal Matters" in the prospectus included in the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. In giving such consent, we do not thereby admit that we are acting within the category of persons whose consent is required under Section 7 of the Act and the rules and regulations of the Commission thereunder. Very truly yours, COOLEY GODWARD LLP By: /s/ Christian E. Plaza ------------------------------- Christian E. Plaza