EXHIBIT 5.1 September 30, 2004 Nastech Pharmaceutical Company Inc. 3450 Monte Villa Parkway Bothell, Washington 98021 Ladies and Gentlemen: We are acting as counsel to Nastech Pharmaceutical Company Inc., a Delaware corporation (the "Company"), in connection with the Registration Statement on Form S-3, File No. 333- (the "Registration Statement"), as filed with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Securities Act"). The Registration Statement covers the registration of up to $80,000,000 in maximum aggregate offering price of (i) shares of the Company's common stock, par value $.006 per share (the "Common Stock"); (ii) warrants to purchase shares of Common Stock (the "Warrants"); and (iii) debt securities (the "Debt Securities") that may be issued in one or more series pursuant to an indenture to be entered into between the Company and Wilmington Trust Company as trustee substantially in the form of the indenture attached as Exhibit 4.3 to the Registration Statement (the "Indenture"). In our capacity as the Company's counsel in connection with the Registration Statement, we are familiar with the proceedings taken and proposed to be taken by the Company in connection with the authorization and issuance of the Common Stock, Warrants and Debt Securities and, for the purposes of this opinion, have assumed such proceedings will be timely completed in the manner presently proposed. We have examined the original, or a photostatic or certified copy, of such records of the Company, certificates of officers of the Company and of public officials and such other documents as we have deemed relevant and necessary as the basis for the opinion set forth below. In such examination, we have 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 certified or photostatic copies and the authenticity of the originals of such copies. Based upon our examinations mentioned above, subject to the assumptions stated and relying on statements of fact contained in the documents we have examined, we are of the opinion that: 1. The Company is a corporation duly organized and validly existing under the laws of the state of Delaware. 2. Upon the adoption by the Board of Directors of the Company (the "Board of Directors") of a resolution in form and content required under applicable law Nastech Pharmaceutical Company Inc. September 30, 2004 Page 2 authorizing a designated number of shares of Common Stock (including any shares of Common Stock that may underlie Warrants or are issuable upon the conversion of any Debt Securities) for issuance at a minimum price or value of consideration to be set by the Board of Directors, the Company shall have the authority to issue the Common Stock (including any shares of Common Stock that may underlie Warrants or are issuable upon the conversion of any Debt Securities) as described in the Registration Statement and a prospectus supplement that is consistent with such authorization, and when such shares of Common Stock (including any shares of Common Stock that may underlie Warrants or are issuable upon the conversion of any Debt Securities) are issued and delivered against payment of the consideration therefore as set by the Board of Directors (which consideration shall not be less than the par value), such shares of Common Stock (including any shares of Common Stock that may underlie Warrants or are issuable upon the conversion of any Debt Securities) shall be legally issued, fully paid and non-assessable. 3. The Company has the requisite authority to enter into warrant agreements relating to shares of Common Stock, and when (a) the terms of the Warrants and any applicable warrant agreement are established or authorized and the Warrants are specifically authorized for issuance by the Board of Directors of the Company or an authorized committee thereof and (b) the Warrants are duly executed by the Company, all conditions for delivery of the Warrants established by the authorization of the Board of Directors of the Company or an authorized committee thereof have been met and the Warrants are delivered by the Company against payment therefor, as described in the Registration Statement and a prospectus supplement that is consistent with such authorization, the Warrants will be binding obligations of the Company. 4. Upon: (a) designation and titling of a class or series of Debt Securities by the Board of Directors of the Company; (b) establishment of the terms, conditions and provisions of such class or series of Debt Securities by the Board of Directors of the Company; (c) establishment of the aggregate principal amount of such class or series of Debt Securities and any limit on such aggregate principal amount by the Board of Directors of the Company; (d) due authorization by the Board of Directors of the Company or an authorized committee thereof of the form, terms, execution and delivery of a supplement to the Indenture dated as of the date prior to the issuance of such class or series of Debt Securities to which it relates; (e) due authorization by the Board of Directors of the Company or an authorized committee thereof of such class or series of Debt Securities for issuance, execution and delivery in exchange for a minimum price or value of consideration to be set by the Board of Directors or an authorized committee thereof; and (f) if such class or series of Debt Securities shall be convertible into shares of Common Stock, reservation and due authorization by the Board of Directors of the Company of the issuance of any Common Stock issuable upon conversion of any such class or series of Debt Securities in accordance with the procedures set forth in Paragraph Nastech Pharmaceutical Company Inc. September 30, 2004 Page 3 (2) above, at a minimum price or value of consideration to be set by the Board of Directors of the Company, all necessary corporate action on the part of the Company will have been taken to authorize such Debt Securities and such Debt Securities shall be legally issued and shall be binding obligations of the Company. We assume for purposes of this opinion that (i) the applicable provisions of the Securities Act and such state "blue sky" or securities laws as may be applicable have been complied with; (ii) there is or will be a sufficient number of authorized but unissued Common Stock available for issuance under the Certificate of Incorporation of the Company, as amended, in connection with the issuance of the securities being registered under the Registration Statement; (iii) in the case of the Warrants, a warrant agreement will have been executed and delivered by the Company, and the holder or holders of any such Warrants or warrant agent appointed on their behalf; and (iv) in the case of the Debt Securities, the Indenture and any supplements thereto will have been executed and delivered by the Company and the trustee of any class or series of Debt Securities. To the extent that the obligations of the Company with respect to the securities being registered under this Registration Statement may be dependent upon such matters, we assume for purposes of this opinion that (i) the other party under the warrant agreement for any of the Warrants or under the Indenture for any of the Debt Securities, namely, the warrant agent or the trustee, respectively, is duly organized, validly existing and in good standing under the laws of its jurisdiction of organization; (ii) that such other party is duly qualified to engage in the activities contemplated by such warrant agreement or Indenture, as applicable; (iii) that such warrant agreement or Indenture, as applicable, has been duly authorized, executed and delivered by the other party and constitutes the legal, valid and binding obligation of the other party enforceable against the other party each in accordance with its respective terms; (iv) that such other party is in compliance with respect to performance of its obligations under such warrant agreement or Indenture, as applicable, in accordance with all applicable laws, rules and regulations; (v) and that such other party has the requisite organizational and legal power and authority to perform its obligations under such warrant agreement or Indenture, as applicable. We consent to the filing of this opinion as an Exhibit to the Registration Statement and to the reference to our firm appearing under the caption "Legal Matters" in the Registration Statement, the prospectus constituting a part thereof and any amendments thereto. In giving this consent, we do not admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act or the General Rules and Regulations of the Commission. We are admitted to the Bar in the State of New York and we express no opinion as to the laws of any other jurisdiction, except the laws of the United States of America and the General Corporation Law of the State of Delaware. Nastech Pharmaceutical Company Inc. September 30, 2004 Page 4 Very truly yours, /s/ Pryor Cashman Sherman & Flynn LLP