Exhibit 5 OPINION AND CONSENT OF KRAMER LEVIN NAFTALIS & FRANKEL LLP August 12, 2004 Nastech Pharmaceutical Company Inc. 3450 Monte Villa Parkway Bothell, Washington 98021 Re: Registration Statement on Form S-8 Ladies and Gentlemen: We have acted as counsel to Nastech Pharmaceutical Company Inc., a Delaware corporation (the "Company"), in connection with the preparation and filing of a Registration Statement on Form S-8 (the "Registration Statement"), for the purpose of registering 600,000 shares (the "Shares") of the common stock, par value $0.006, of the Company (the "Common Stock") and related stock options for issuance under the Company's 2004 Stock Incentive Plan (the "Plan"), a copy of which is filed as Exhibit 99 to the Registration Statement. We have reviewed such documents and made such investigations as we have deemed appropriate to enable us to express an opinion on the matters covered hereby, and we have also examined and relied upon the representations, statements or certificates of officers or representatives of the Company, public officials and others. Based on the foregoing, we are of the opinion that, if, as and when the Shares are issued and sold (and the consideration therefor received) pursuant to (i) the provisions of option agreements duly authorized under the Plan and in accordance with the Registration Statement or (b) duly authorized direct stock issuances in accordance with the Plan and the Registration Statement, the Shares will be legally issued, fully-paid and non-assessable. We express no opinion as to any laws other than the General Corporation Law of the State of Delaware and the laws of the State of New York and the federal laws of the United States of America. Our opinion is rendered only with respect to the laws which are currently in effect in such jurisdictions. We hereby consent to the use of this opinion as Exhibit 5 to the Registration Statement. In giving this consent, we do not thereby admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the rules and regulations promulgated thereunder. Very truly yours, /s/KRAMER LEVIN NAFTALIS & FRANKEL LLP