Exhibit 5.1 TESTA, HURWITZ & THIBEAULT, LLP ATTORNEYS AT LAW HIGH STREET TOWER, 125 HIGH STREET OFFICE (617) 248-7000 BOSTON, MASSACHUSETTS 02110 FAX (617) 248-7100 November 14, 1996 Endogen, Inc. 30 Commerce Way Woburn, MA 01801 RE: Form S-3 Registration Statement Ladies and Gentlemen: We are counsel to Endogen, Inc., a Massachusetts corporation (the "Company"), and have represented the Company in connection with the preparation and filing of the Company's Form S-3 Registration Statement (the "Registration Statement"), covering the sale to the public of up to 750,069 shares of the Company's Common Stock, $.01 par value per share, being sold by certain stockholders of the Company (the "Shares"). Terms not otherwise defined herein shall have the meaning assigned to them in the Registration Statement. We have reviewed the corporate proceedings taken by the Board of Directors of the Company with respect to the authorization and issuance of the Shares. We have also examined and relied upon originals or copies, certified or otherwise authenticated to our satisfaction, of all corporate records, documents, agreements or other instruments of the Company and have made all investigations of law and have discussed with the Company's officers all questions of fact that we have deemed necessary or appropriate. Based upon and subject to the foregoing, we are of the opinion that when the Shares to be sold by the Selling Stockholders pursuant to the Prospectus have been issued and paid for in accordance with the terms described in the Prospectus, such shares of Common Stock will have been validly issued and will be fully paid and nonassessable. We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement and to the reference to our firm in the Prospectus contained in the Registration Statement under the caption "Legal Matters." Very truly yours, /s/ Testa, Hurwitz & Thibeault, LLP TESTA, HURWITZ & THIBEAULT, LLP