Exhibit 5.1

August 6, 2026

Medical Properties Trust, Inc.

10500 Liberty Parkway

Birmingham, Alabama 35242

Re: Securities Registered under Registration Statement on Form S-8

We have acted as your counsel in connection with the filing of a Registration Statement on Form S-8 (the “Registration Statement”) pursuant to the Securities Act of 1933, as amended (the “Securities Act”), on or about the date hereof relating to an aggregate of 12,000,000 shares (the “Shares”) of common stock, $0.001 par value per share (“Common Stock”), of Medical Properties Trust, Inc., a Maryland corporation (the “Company”), that may be issued pursuant to the Medical Properties Trust, Inc. Second Amended and Restated 2019 Equity Incentive Plan (the “Second A&R 2019 Plan”).

We have reviewed such documents and made such examination of law as we have deemed appropriate to give the opinions set forth below. We have relied, without independent verification, on certificates of public officials and, as to matters of fact material to the opinion set forth below, on certificates of officers of the Company.

For purposes of the opinion set forth below, we have assumed that no event occurs that causes the number of authorized shares of Common Stock available for issuance by the Company to be less than the number of then unissued Shares.

The opinion set forth below is limited to the Maryland General Corporation Law.

Based on the foregoing, we are of the opinion that the Shares have been duly authorized and, when delivered against payment therefor in accordance with the terms of the Second A&R 2019 Plan, will be validly issued, fully paid and nonassessable.

This opinion letter and the opinion it contains shall be interpreted in accordance with the Core Opinion Principles as published in 74 Business Lawyer 815 (Summer 2019).

We hereby consent to the inclusion of this opinion as Exhibit 5.1 to the Registration Statement. In giving our consent, 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 thereunder.

 

Very truly yours,
/s/ Goodwin Procter LLP
GOODWIN PROCTER LLP