
<PAGE>



                                                                     Exhibit 5.1



                                December 23, 1998


Brandywine Realty Trust
14 Campus Boulevard
Newtown Square, PA  19073

                  Re:  Form S-3 Registration Statement
                       -------------------------------

Gentlemen:

              We have acted as counsel to Brandywine Realty Trust, a Maryland
real estate investment trust (the "Company"), in connection with the preparation
of a registration statement (the "Registration Statement") of the Company on
Form S-3 under the Securities Act of 1933, as amended (the "Act"), and the
filing of the Registration Statement with the Securities and Exchange Commission
(the "Commission"). The Registration Statement relates to the offer and sale
from time to time of up to: (i) 750,000 7.25% Series A Cumulative Convertible
Preferred Shares of Beneficial Interest, par value $.01 per share ("Series A
Preferred Shares"), of the Company, (ii) 1,415,094 Common Shares of Beneficial
Interest, par value $.01 per share ("Common Shares"), of the Company issuable
upon conversion or redemption of the Series A Preferred Shares and (iii) an
additional 1,127,896 Common Shares issuable upon redemption of Class A units of
limited partnership interest ("Units") in Brandywine Operating Partnership, L.P.

              In connection with this opinion, we have examined the originals or
copies, certified or otherwise identified to our satisfaction, of the
Registration Statement, the Declaration of Trust and the Bylaws of the Company,
as amended to date, resolutions of the Company's Board of Trustees and such
other documents and trust records relating to the Company as we have deemed
appropriate. Insofar as this opinion relates to matters of Maryland law, we have
relied exclusively upon the opinion of Ballard Spahr Andrews & Ingersoll, LLP
addressed to the Company, dated December 23, 1998.

              Based upon the foregoing, we are of the opinion that:

              1. The Series A Preferred Shares are validly issued, fully paid
and nonassessable.

              2. The Common Shares subject to issuance upon redemption or
conversion of the Series A Preferred Shares will, upon such issuance in
accordance with the terms of the Series A Preferred Shares, be validly issued,
fully paid and nonassessable.

              3. The Common Shares subject to issuance upon redemption of Units
will, upon such issuance in accordance with the terms of such Units, be validly
issued, fully paid and nonassessable.

              We assume no obligation to supplement this opinion if any
applicable law changes after the date hereof or if we become aware of any fact
that might change the opinion expressed herein after the date hereof.

              We hereby consent to the reference to our firm under the section
"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 this consent, we do not admit that we are within the category of persons
whose consent is required by Section 7 of the 1933 Act.

                                           Very truly yours,



                                           /s/ Pepper Hamilton LLP            
                                           -----------------------             
                                           Pepper Hamilton LLP




