EX-5 2 a2144014zex-5.htm EXHIBIT 5
QuickLinks -- Click here to rapidly navigate through this document


EXHIBIT 5

October 5, 2004

Theravance, Inc.
901 Gateway Boulevard
South San Francisco, California 94080

    Re:
    Theravance, Inc. Registration Statement
    for 13,359,745 Shares of Common Stock

Ladies and Gentlemen:

        I refer to your registration on Form S-8 (the "Registration Statement") under the Securities Act of 1933, as amended, of 13,359,745 shares of Common Stock issuable in the aggregate under the 2004 Equity Incentive Plan and 2004 Employee Stock Purchase Plan (the "Plans"). I advise you that, in my opinion, when such shares have been issued and sold pursuant to the applicable provisions of the Plans, and in accordance with the Registration Statement, such shares will be validly issued, fully paid and nonassessable shares of the Company's Common Stock.

        I hereby consent to the filing of this opinion as an exhibit to the Registration Statement.

  Very truly yours,

 

/s/  
GUNDERSON DETTMER STOUGH VILLENEUVE FRANKLIN & HACHIGIAN LLP      



QuickLinks