1 EXHIBIT 5 January 9, 1996 Genome Therapeutics Corp. 100 Beaver Street Waltham, MA 02154 Re: Registration Statement on Form S-3 Ladies and Gentlemen: This opinion is rendered to you in connection with the above-mentioned registration statement (the "Registration Statement") on Form S-3 with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the "Act"), for the registration under the Act by Genome Therapeutics Corp. (the "Company") of up to 1,483,098 shares of the Company's Common Stock, $0.10 par value per share (the "Shares"). 1,453,023 of the Shares (the "Issued Shares") have been previously issued and sold by the Company and 30,075 of the Shares (the "Warrant Shares") are to be issued pursuant to warrants (collectively, the "Warrants") issued by the Company to certain of the selling stockholders named in the Registration Statement. We have assumed that the Warrant Shares will be issued and sold only upon payment therefor and as provided in the Warrants. Based upon the foregoing, we are of the opinion that (i) the Shares have been duly authorized, (ii) the Issued Shares are validly issued, fully-paid and nonassessable, and (iii) the Warrant Shares, when issued, delivered, and paid for as provided in the Warrants will be validly issued, fully-paid and nonassessable. We hereby consent to the filing of this opinion as part of the Registration Statement and to the use of our name therein and in the related prospectus under the caption "Legal Matters." 2 -2- Genome Therapeutics Corp. January 9, 1996 It is understood that this opinion is to be used only in connection with the offer and sale of the Shares while the Registration Statement is in effect. Very truly yours, Ropes & Gray PO/maw:3099851.01