
<PAGE>


                                                                   Exhibit 5.1
                                                                   -----------

                                 May 18, 1998

Brandywine Realty Trust
16 Campus Boulevard
Newtown Square, PA  19073

            Re: Amended and Restated 1997 Long-Term Incentive Plan

Ladies and Gentlemen:

            You have requested our opinion, as counsel for Brandywine Realty
Trust, a Maryland real estate investment trust (the "Company"), in connection
with its Registration Statement on Form S-8 (the "Registration Statement"),
under the Securities Act of 1933, as amended (the "Securities Act"), which
registers the offer and sale of 5,000,000 common shares of beneficial
interest, par value $.01 per share (the "Shares") of the Company, issuable
pursuable to the Company's Amended and Restated 1997 Long-Term Incentive Plan
(the "Plan").

            We have examined such records and documents and have made such
examination of law as we have deemed relevant in connection with this opinion.
Based upon such examination, it is our opinion that when there has been
compliance with the Securities Act and applicable state securities laws, the
Shares, when issued against payment pursuant to their terms and the Plan, will
be validly issued, fully paid and nonassessable. 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 as of the date hereof.

            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 filing of this opinion as an exhibit to
the Registration Statement and to the use of the name of our firm therein. In
doing so, we do not admit that we are in the category of persons whose consent
is required under Section 7 of the Securities Act or the rules and regulations
of the Securities and Exchange Commission promulgated thereunder.


                               Very truly yours,


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


