<PAGE>
                                                                  EXHIBIT 10.5
                           AMENDMENT NUMBER ONE TO THE
                          AGREEMENT AND PLAN OF MERGER


         This Amendment Number One (this "Amendment") to the Agreement and
Plan of Merger dated as of August 28, 1997 (the "Agreement") between Project
Z Corporation ("Project Z") and Avid Corporation ("Avid") is made as of this
28th day of February, 1999, by and among Avid (including its capacity as
successor to Project Z), Triangle Pharmaceuticals, Inc. ("Triangle"), and
Forrest H. Anthony, Alan G. Walton and Marcia T. Bates (the "Securityholder
Agent"), on behalf of and as attorney-in-fact for all of the stockholders,
optionholders and warrantholders of Avid immediately prior to the merger of
Project Z with and into Avid (the "Former Avid Stockholders"). Capitalized
terms used herein which are not defined herein shall have the definitions
ascribed to them in the Reorganization Agreement (defined below).

                                    RECITALS

         A. Triangle, Project Z and Avid entered into an Agreement and Plan
of Reorganization dated as of June 30, 1997 (the "Reorganization Agreement"),
which contained the terms for the merger of Project Z with and into Avid and
after which Avid would become a wholly-owned subsidiary of Triangle.

         B. Avid and Project Z entered into the Agreement, pursuant to which
Project Z merged with and into Avid on August 28, 1997, and Avid became a
wholly-owned subsidiary of Triangle.

         C. Triangle, Avid and the Securityholder Agent, on behalf of and as
attorney-in-fact for the Former Avid Stockholders, are concurrently herewith
entering into an amendment to the Reorganization Agreement (the
"Reorganization Amendment") to extend the eighteen (18) month period set
forth in Section 1.6(b)(ii)(B) of the Reorganization Agreement after which,
if Triangle has not Initiated a Definitive Clinical Trial with the Lead
Compound or elected in writing to continue the development of the Lead
Compound, the Securityholder Agent will have the option to either exercise
the Lead Compound Option and to amend certain other provisions of the
Agreement as set forth in the Reorganization Amendment.

         D. Triangle, Avid (including its capacity as successor to Project Z)
and the Securityholder Agent desire to amend the Agreement to make it
consistent with the terms of the Reorganization Agreement as amended by the
Reorganization Amendment.

         NOW, THEREFORE, in consideration of the foregoing and the promises
and covenants contained herein, and for other good and valuable consideration
the receipt and sufficiency of which is hereby acknowledged, the parties
hereto agree as follows:

1.       AMENDMENTS TO AGREEMENT.

1.1 ARTICLE IV.A.2.B.(I). Article IV.A.2.b.(i) of the Agreement is hereby
amended and restated in its entirety as follows:

                           "(i) In the event that Parent, in its sole
         discretion, (x) Initiates (as defined in Section 1.6(b)(iii) of the
         Reorganization Agreement) a Definitive


<PAGE>

         Clinical Trial (as defined in Section 1.6(b)(iii) of the
         Reorganization Agreement) with the Lead Compound (as defined in
         Section 1.6(b)(iii) of the Reorganization Agreement), or (y) notifies
         the Securityholder Agent (as defined in Section 7.2(g) of the
         Reorganization Agreement) in a writing that specifically references
         Section 1.6(b)(ii)(A) of the Reorganization Agreement of its election
         to continue the development of the Lead Compound even if Parent has
         not Initiated a Definitive Clinical Trial with the Lead Compound,
         Parent shall within seventy-five (75) days thereafter make available
         to the Exchange Agent (as defined in Section IV.E.1 below) for
         distribution pursuant to Section IV.E below, 1,500,000 shares of
         Parent Common Stock."

1.2 ARTICLE IV.A.2.B.(II). Article IV.A.2.b.(ii) of the Agreement is hereby
amended and restated in its entirety as follows:

                          "(ii) If neither of the conditions described in
        Section IV.A.2.b.(i) above is satisfied on or prior to thirty (30)
        months after the Closing Date and the Securityholder Agent elects not
        to exercise the Lead Compound Option (as defined in Section 5.17 of the
        Reorganization Agreement) within the thirty (30) day period set forth
        in Section 5.17 of the Reorganization Agreement, Parent shall within
        seventy-five (75) days thereafter make available to the Exchange Agent
        for distribution pursuant to Section IV.E below, 100,000 shares of
        Parent Common Stock."

2.       SECOND PAYMENT.

                  Triangle shall, on or before May 14, 1999, or as soon
thereafter as is reasonably practicable, deliver 100,000 shares of Triangle
Common Stock (the "Second Payment") to the Escrow Agent. The certificate for
the Second Payment shall be issued as of April 1, 1999, shall be deposited in
the Escrow Fund and shall be held by the Escrow Agent for each of the Former
Avid Stockholders in proportion to the aggregate number of shares of Parent
Common Stock which such holder would otherwise be entitled to receive from
the First Payment pursuant to Section 1.7 of the Reorganization Agreement by
virtue of such holder's ownership of outstanding shares of Company Capital
Stock immediately prior to the Effective Time, and assuming for the purposes
of such allocation that the holders of all Assumed Options and the holders of
all Assumed Warrants were the holders of the number of shares of the Company
Common Stock that would have been issued had all of the Assumed Options and
all of the Assumed Warrants been exercised in full immediately prior to the
Effective Time (assuming that the exercise price was paid in cash). The
Second Payment shall not be subject to claims against the Escrow Fund by
Triangle for Losses pursuant to Section 7.2 of the Reorganization Agreement,
except for Losses, if any, identified in Subsection 7.2(a)(iv) of the
Reorganization Agreement. Subject to the receipt of an Agent Certificate, in
form acceptable to Triangle, pursuant to Section 1.7(d)(i) of the
Reorganization Agreement with respect to the distribution of the Second
Payment, the Second Payment shall be distributed from the Escrow Account
within seventy-five (75) days after the expiration of the thirty (30) month
period set forth in Section 1.6(b)(ii)(B) of the Reorganization Agreement.
Triangle shall be entitled to rely without investigation on the accuracy of
the information set forth in such Agent Certificate.


                                      -2-
<PAGE>

3.       EFFECT OF AMENDMENT.

                  Except as amended and set forth above, the Agreement shall
continue in full force and effect. In the event of any conflict between the
terms of the Agreement and the terms of this Amendment, the terms of this
Amendment shall govern and control.

4.       FURTHER ASSURANCES.

                  The parties agree to execute such further instruments,
agreement and documents and to take such further action as may reasonably be
necessary to carry out the intent of this Amendment.

5.       COUNTERPARTS.

                  This Amendment may be executed in any number of
counterparts, each which will be deemed an original, and all of which
together shall constitute one instrument.

6.       SEVERABILITY.

                  If one or more provisions of this Amendment are held to be
unenforceable under applicable law, such provision shall be excluded from
this Amendment and the balance of the Amendment shall be interpreted as if
such provision were so excluded and shall be enforceable in accordance with
its terms.

7.       GOVERNING LAW.

                  This Amendment shall be governed by and construed under the
laws of the State of Delaware regardless of the laws that might otherwise
govern under applicable principles of conflicts of laws thereof.

                [REMAINDER OF THIS PAGE INTENTIONALLY LEFT BLANK]


                                      -3-
<PAGE>

         This Amendment is hereby executed as of the date first above written.

TRIANGLE:                                    TRIANGLE PHARMACEUTICALS, INC., a
                                             Delaware corporation


                                             By:
                                                ------------------------------
                                                 M. Nixon Ellis, President and
                                                 Chief Operating Officer

AVID:                                        AVID CORPORATION, a Pennsylvania
                                             corporation


                                              By:
                                                 -----------------------------
                                                 M. Nixon Ellis, President

SECURITYHOLDER AGENT:


                                             ---------------------------------
                                                 Forrest H. Anthony


                                             ---------------------------------
                                                 Alan G. Walton


                                             ---------------------------------
                                                 Marcia T. Bates




                     [SIGNATURE PAGE TO AMENDMENT NUMBER ONE TO
                        THE AGREEMENT AND PLAN OF MERGER]