EXHIBIT 5.1 [SHAH RAY & BYLER, LLP] February 12, 2002 Hersha Hospitality Trust 148 Sheraton Drive, Box A New Cumberland, PA 17070 Re: Hersha Hospitality Trust -- Dividend Reinvestment and Share Purchase Plan on Form S-3 (the "Registration Statement") ------------------------------------------ We have acted as counsel for Hersha Hospitality Trust, a Maryland business trust (the "Company"), in connection with the proposed offer and sale of up to 500,000 Priority Class A Common Shares (the "Shares") of the Company, par value $0.01 per share (the "Common Shares"), pursuant to the Company's Dividend Reinvestment Plan (the "Plan"). In reaching the conclusions expressed in this opinion, we have (a) examined such certificates of public officials and of corporate officers and trustees and such other documents and matters as we have deemed necessary or appropriate, (b) relied upon the accuracy of facts and information set forth in all such documents, and (c) assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as copies, and the authenticity of the originals from which all such copies were made. Based on the foregoing, we are of the opinion that the Shares to be sold have been duly authorized and, when issued, delivered and paid for in accordance with the terms of the Plan, will be validly issued, fully paid and nonassessable Common Shares of the Company. We consent to the use of this opinion as an exhibit to the Registration Statement and to the reference to our firm in the Registration Statement and the Prospectus constituting a part thereof under the caption "Legal Opinion." Yours very truly, SHAH RAY & BYLER, LLP