<PAGE>
                                                                   EXHIBIT 10.21
                AMENDMENT NO. 3 TO THE PARTICIPATION AGREEMENT,
               THE LEASE AGREEMENT AND OTHER OPERATIVE AGREEMENTS


         THIS AMENDMENT NO. 3 (this "Amendment") dated as of October 2, 2001, is
by and among aaiPHARMA INC. (f/k/a Applied Analytical Industries, Inc.), a
Delaware corporation (the "Lessee" or the "Construction Agent"); WELLS FARGO
BANK NORTHWEST, NATIONAL ASSOCIATION (f/k/a First Security Bank, National
Association), a national banking association, not individually but solely as the
Owner Trustee under the AAI Realty Trust 1998-1 (the "Owner Trustee" or the
"Lessor"); the various banks and other lending institutions listed on the
signature pages hereto (subject to the definition of Lenders in Appendix A to
the Participation Agreement referenced below, individually, a "Lender" and
collectively, the "Lenders"); the various banks and other lending institutions
listed on the signature pages hereto as holders of certificates issued with
respect to the AAI Realty Trust 1998-1 (subject to the definition of Holders in
Appendix A to the Participation Agreement referenced below, individually, a
"Holder" and collectively, the "Holders"); and BANK OF AMERICA, NATIONAL
ASSOCIATION (as successor to NationsBank, National Association), a national
banking association, as the agent for the Lenders and respecting the Security
Documents, as the agent for the Lenders and the Holders, to the extent of their
interests (in such capacity, the "Agent"). Capitalized terms used in this
Amendment but not otherwise defined herein shall have the meanings set forth in
Appendix A to the Participation Agreement (hereinafter defined).

                                   WITNESSETH

         WHEREAS, the parties to this Amendment are parties to that certain
Participation Agreement dated as of October 2, 1998 (the "Participation
Agreement"), certain of the parties to this Amendment are parties to that
certain Lease Agreement dated as of October 2, 1998 (the "Lease Agreement") and
certain of the parties to this Amendment are parties to the other Operative
Agreements relating to a $15 million tax retention operating lease facility (the
"Facility") that has been established in favor of the Lessee;

         WHEREAS, the parties to this Amendment are parties to the certain
Amendment No. 1 to the Participation Agreement, the Credit Agreement, the Trust
Agreement, the Security Agreement and Other Operative Agreements dated as of
July 6, 1999 ("Amendment No. 1"), certain of the parties to this Amendment are
parties to that certain Amendment and Forbearance Agreement dated as of August
27, 1999 ("Forbearance Agreement"), and the parties to this Amendment are
parties to the certain Amendment No. 2 to the Participation Agreement, the
Credit Agreement, the Trust Agreement, the Security Agreement and Other
Operative Agreements dated as of November 30, 1999 ("Amendment No. 2");

         WHEREAS, certain of the parties to this Amendment are parties to that
certain Second Amended and Restated Loan Agreement dated as of August 17, 2001
(the "Loan Agreement");

         WHEREAS, the parties hereto have agreed to modify and amend the
Participation Agreement, the Lease Agreement and the other Operative Agreements
to reflect certain provisions in the Loan Agreement, including among other
things in order to modify certain


<PAGE>

provisions relating to pricing, conform certain expiration dates to the Loan
Agreement and incorporate certain representations and warranties made in the
Loan Agreement, on the terms and conditions set forth herein;

         NOW, THEREFORE, IN CONSIDERATION of the premises and other good and
valuable consideration, the receipt and sufficiency of which is hereby
acknowledged, the parties agree as follows:

         1.       Appendix A to the Participation Agreement is hereby amended to
modify or add, as applicable, the following defined terms as follows:

                  "Applicable Percentage" shall mean (i) for Eurodollar Loans,
the Applicable Percentage for Eurodollar Loans referenced in the definition of
"Applicable Percentage" in Section 1.1 of the Lessee Credit Agreement and (ii)
for Eurodollar Holder Advances, the Applicable Percentage for Eurodollar Loans
referenced in the definition of "Applicable Percentage" in Section 1.1 of the
Lessee Credit Agreement plus fifty one-hundredths of one percent (0.50%).

                  "Bankruptcy Event" means, with respect to any Person, the
occurrence of any of the following: (i) the entry of a decree or order for
relief by a court or governmental agency in an involuntary case under any
applicable bankruptcy, insolvency or other similar law now or hereafter in
effect, or the appointment by a court or governmental agency of a receiver,
liquidator, assignee, custodian, trustee, sequestrator (or similar official) of
such Person or for any substantial part of its property or the ordering of the
winding up or liquidation of its affairs by a court or governmental agency; or
(ii) the commencement against such Person of an involuntary case under any
applicable bankruptcy, insolvency or other similar law now or hereafter in
effect, or of any case, proceeding or other action for the appointment of a
receiver, liquidator, assignee, custodian, trustee, sequestrator (or similar
official) of such Person or for any substantial part of its property or for the
winding up or liquidation of its affairs, and such involuntary case or other
case, proceeding or other action shall remain undismissed for a period of sixty
(60) consecutive days, or the repossession or seizure by a creditor of such
Person of a substantial part of its property; or (iii) such Person shall
commence a voluntary case under any applicable bankruptcy, insolvency or other
similar law now or hereafter in effect, or consent to the entry of an order for
relief in an involuntary case under any such law, or consent to the appointment
of or the taking possession by a receiver, liquidator, assignee, secured
creditor, custodian, trustee, sequestrator (or similar official) of such Person
or for any substantial part of its property or make any general assignment for
the benefit of creditors; or (iv) such Person shall be unable to, or shall admit
in writing its inability to, pay its debts generally as they become due.

                  "Change of Control" means any of the following events: (a) the
sale, lease, transfer or other disposition (other than by way of merger or
consolidation), in one or a series of related transactions, of all or
substantially all of the assets of the Lessee and its Subsidiaries taken as a
whole to any "person" or "group" (within the meaning of Sections 13(d) and
14(d)(2) of the Securities Exchange Act), (b) any "person" or "group" (within
the meaning of Sections 13(d) and 14(d)(2) of the Securities Exchange Act) other
than Frederick D. Sancilio or his Related Parties, shall have acquired
beneficial ownership, directly or indirectly, of, or shall have acquired by


<PAGE>


contract or otherwise, or shall have entered into a contract or arrangement
that, upon consummation, will result in its or their acquisition of, or control
over, 35% or more of the outstanding Voting Stock of the Lessee, (c) Continuing
Directors shall fail to constitute a majority of the members of the board of
directors of the Lessee or (d) the occurrence of a "Change of Control" (or any
comparable term) under, and as defined in, the documents evidencing or governing
any Subordinated Indebtedness (as such term is defined in the Lessee Credit
Agreement). As used herein, "beneficial ownership" shall have the meaning
provided in Rule 13d-3 of the Securities and Exchange Commission under the
Securities Exchange Act.

                  "Continuing Director" means, as of any date of determination,
any member of the board of directors of the Lessee who (x) was a member of the
board of directors of the Lessee as of August 17, 2001 or (y) was nominated for
election or elected to such board of directors with the approval of a majority
of the Continuing Directors who were members of such board at the time of such
nomination or election.

                  "ERISA Event" means (i) with respect to any Plan, the
occurrence of a Reportable Event or the substantial cessation of operations
(within the meaning of Section 4062(e) of ERISA); (ii) the withdrawal by the
Lessee or any member of the Controlled Group or any ERISA Affiliate from a
Multiple Employer Plan during a plan year in which it was a substantial employer
(as such term is defined in Section 4001(a)(2) of ERISA), or the termination of
a Multiple Employer Plan; (iii) the distribution of a notice of intent to
terminate or the actual termination of a Plan pursuant to Section 4041(a)(2) or
4041A of ERISA; (iv) the institution of proceedings to terminate or the actual
termination of a Plan by the PBGC under Section 4042 of ERISA; (v) any event or
condition which might constitute grounds under Section 4042 of ERISA for the
termination of, or the appointment of a trustee to administer, any Plan; (vi)
the complete or partial withdrawal of the Lessee or any member of the Controlled
Group or any ERISA Affiliate from a Multiemployer Plan; (vii) the conditions for
imposition of a lien under Section 302(f) of ERISA exist with respect to any
Plan; or (viii) the adoption of an amendment to any Plan requiring the provision
of security to such Plan pursuant to Section 307 of ERISA.

                  "Executive Officer" of any Person means any of the chief
executive officer, chief operating officer, president, executive vice president,
chief financial officer, controller or treasurer of such Person.

                  "Expiration Date" shall mean the Basic Term Expiration Date.

                  "Lessee Credit Agreement" shall mean that certain Second
Amended and Restated Loan Agreement dated as of August 17, 2001 by and among the
Lessee, as Borrower, certain of the subsidiaries of the Borrower from time to
time party thereto, as Guarantors, Banc of America Mezzanine Capital LLC, as a
Lender, the other lenders from time to time party thereto, and Bank of America,
N.A., as Agent, as such may hereafter be amended, modified, supplemented,
restated and/or replaced from time to time.

                  "Lessee Credit Agreement Event of Default" shall mean an Event
of Default as defined in Section 9.1 of the Lessee Credit Agreement.


<PAGE>


                  "Plan" means any employee benefit plan (as defined in Section
3(3) of ERISA) which is covered by ERISA and with respect to which the Lessee or
any member of the Controlled Group or any ERISA Affiliate is (or, if such plan
were terminated at such time, would under Section 4069 of ERISA be deemed to be)
an "employer" within the meaning of Section 3(5) of ERISA.

                  "Related Party" or "Related Parties" means spouses, lineal
ancestors or descendants, natural or adopted, and spouses of lineal ancestors or
descendants, or trusts for the sole benefit of any of such Persons.

                  "Securities Exchange Act" means the Securities Exchange Act of
1934, as amended, and all regulations issued pursuant thereto.

                  "Single Employer Plan" means any Plan which is covered by
Title IV of ERISA, but which is not a Multiemployer Plan or a Multiple Employer
Plan.

                  "Subsidiary" means, as to any Person at any time, (a) any
corporation more than 50% of whose Capital Stock of any class or classes having
by the terms thereof ordinary voting power to elect a majority of the directors
of such corporation (irrespective of whether or not at such time, any class or
classes of such corporation shall have or might have voting power by reason of
the happening of any contingency) is at such time owned by such Person directly
or indirectly through Subsidiaries, and (b) any partnership, association, joint
venture or other entity of which such Person directly or indirectly through
Subsidiaries owns at such time more than 50% of the Capital Stock.

                  "Term" shall mean the Basic Term.

                  "Voting Stock" means, with respect to any Person, Capital
Stock issued by such Person the holders of which are ordinarily, in the absence
of contingencies, entitled to vote for the election of directors (or persons
performing similar functions) of such Person, even though the right so to vote
has been suspended by the happening of such a contingency.

         2.       The definition of "Renewal Term" in Appendix A to the
Participation Agreement is hereby deleted in its entirety.

         3.       Section 2.2 of the Lease Agreement is hereby deleted and
replaced in its entirety with the following:

<PAGE>


         2.2      LEASE TERM.

                  The basic term of this Lease with respect to each Property
         (the "Basic Term") shall begin upon the Property Closing Date for such
         Property (in each case the "Basic Term Commencement Date") and shall
         end on September 30, 2002, unless the Basic Term is earlier terminated
         in accordance with the provisions of this Lease. Notwithstanding the
         foregoing, Lessee shall not be obligated to pay Basic Rent until the
         Rent Commencement Date with respect to such Property.

         4.       Section 17.1 of the Lease is hereby deleted and replaced in
its entirety with the following:

         17.1     LEASE EVENTS OF DEFAULT.

                  A Lease Event of Default shall exist upon the occurrence and
         during the continuance of any of the following specified events (each a
         "Lease Event of Default"):

                     (a)   Payment.  Lessee shall

                           (i)      default in the payment when due of any
                  Termination Value, on the date any such payment is due and
                  payable, or any payment of Basic Rent or Supplemental Rent due
                  on the due date of any such payment of Termination Value, or
                  any amount due on the Expiration Date;

                           (ii)     default, and such default shall continue for
                  three (3) or more Business Days, in the payment when due of
                  any Basic Rent (except as set forth in Section 17.1(a)(i));

                           (iii)    default, and such default shall continue for
                  three (3) or more Business Days after receipt of notice that
                  such payment is due, in the payment when due of any
                  Supplemental Rent (except as set forth in Section 17.1(a)(i));
                  or

                     (b)   Representations. Any representation, warranty or
                  statement made or deemed to be made by the Lessee herein, in
                  any of the other Operative Agreements, or in any statement or
                  certificate delivered or required to be delivered pursuant
                  hereto or thereto shall prove untrue in any material respect
                  on the date as of which it was deemed to have been made; or

                     (c)   Covenants. The Lessee shall:

                           (i)      default in the due performance or observance
                  of any term, covenant or agreement contained in Sections 7.2,
                  7.8, 7.10, 7.11 or 7.12 of


<PAGE>

                  the Lessee Credit Agreement or Section 8 of the Lessee Credit
                  Agreement, each as incorporated by reference pursuant to
                  Section 28.1 herein;

                           (ii)     default in the due performance or observance
                  of any term, covenant or agreement contained in Sections
                  7.1(a), (b), (c) or (d) of the Lessee Credit Agreement as
                  incorporated by reference pursuant to Section 28.1 herein, and
                  such default shall continue unremedied for a period of at
                  least 5 days after the earlier of an Executive Officer of the
                  Lessee becoming aware of such default or notice thereof by the
                  Agent; or

                           (iii)    default in the due performance or observance
                  by it of any term, covenant or agreement (other than those
                  referred to in subsections (a), (b), (c)(i), (c)(ii) or (j) of
                  this Section 17.1) contained in this Lease Agreement or any
                  other Operative Agreement and such default shall continue
                  unremedied for a period of at least 30 days after the earlier
                  of an Executive Officer of the Lessee becoming aware of such
                  default or notice thereof by the Agent; or

                     (d)   Operative Agreements. Except as a result of or in
                  connection with a dissolution, merger or disposition of a
                  Subsidiary not prohibited by Sections 8.4 or 8.5 of the Lessee
                  Credit Agreement as incorporated by reference pursuant to
                  Section 28.1 herein, any Operative Agreement shall fail to be
                  in full force and effect or to give the Agent and/or the other
                  Financing Parties the Liens, rights, powers and privileges
                  purported to be created thereby, or the Lessee shall so state
                  in writing; or

                     (e)   Bankruptcy, etc. Any Bankruptcy Event shall occur
                  with respect to the Lessee; or

                     (f)   Defaults under Other Agreements.

                           (i)      The Lessee shall default in the performance
                  or observance (beyond the applicable grace period with respect
                  thereto, if any) or any material obligation or condition of
                  any contract or lease material to the Lessee and its
                  Consolidated Subsidiaries taken as a whole if such default
                  could reasonably be expected to have a Material Adverse
                  Effect; or

                           (ii)     With respect to any Indebtedness (other than
                  Indebtedness outstanding under this Lease or the other
                  Operative Agreements) in excess of $2,000,000 in the aggregate
                  for the Lessee and its Consolidated Subsidiaries taken as a
                  whole, (A) either (1) a default in any payment shall occur and
                  continue (beyond the applicable grace period with respect
                  thereto, if any) with respect to any such Indebtedness, or (2)
                  a default in the observance or performance relating to such
                  Indebtedness or contained in any instrument or agreement
                  evidencing, securing or relating thereto, or any other event
                  or condition shall occur or exist, the effect of which default


<PAGE>

         or other event or condition is to cause, or permit, the holder or
         holders of such Indebtedness (or trustee or agent on behalf of such
         holders) to cause (determined without regard to whether any notice or
         lapse of time is required), any such Indebtedness to become due prior
         to its stated maturity; or (B) any such Indebtedness shall be declared
         due and payable, or required to be prepaid other than by a regularly
         scheduled required prepayment, prior to the stated maturity thereof; or

                  (g)      Judgments. One or more judgments or decrees shall be
         entered against the Lessee or any of its Consolidated Subsidiaries
         involving a liability of $2,000,000 or more in the aggregate (to the
         extent not paid or fully covered by insurance provided by a carrier who
         has acknowledged coverage and has the ability to perform) and any such
         judgments or decrees shall not have been vacated, discharged or stayed
         or bonded pending appeal within 30 days from the entry thereof; or

                  (h)      ERISA. Any of the following events or conditions, if
         such event or condition could involve possible taxes, penalties, and
         other liabilities in an aggregate amount in excess of $2,000,000: (i)
         any "accumulated funding deficiency," as such term is defined in
         Section 302 of ERISA and Section 412 of the Code, whether or not
         waived, shall exist with respect to any Plan, or any lien shall arise
         on the assets of the Lessee or any Consolidated Subsidiary or any ERISA
         Affiliate in favor of the PBGC or a Plan; (ii) an ERISA Event shall
         occur with respect to a Single Employer Plan, which is, in the
         reasonable opinion of the Agent, likely to result in the termination of
         such Plan for purposes of Title IV of ERISA; (iii) an ERISA Event shall
         occur with respect to a Multiemployer Plan or Multiple Employer Plan,
         which is, in the reasonable opinion of the Agent, likely to result in
         (A) the termination of such Plan for purposes of Title IV of ERISA, or
         (B) the Lessee or any Consolidated Subsidiary or any ERISA Affiliate
         incurring any liability in connection with a withdrawal from,
         reorganization of (within the meaning of Section 4241 of ERISA), or
         insolvency (within the meaning of Section 4245 of ERISA) of such Plan;
         or (iv) any prohibited transaction (within the meaning of Section 406
         of ERISA or Section 4975 of the Code) or breach of fiduciary
         responsibility shall occur which may subject the Lessee or any
         Consolidated Subsidiary or any ERISA Affiliate to any liability under
         Sections 406, 409, 502(i), or 502(l) of ERISA or Section 4975 of the
         Code, or under any agreement or other instrument pursuant to which the
         Lessee or any Consolidated Subsidiary or any ERISA Affiliate has agreed
         or is required to indemnify any person against any such liability; or

                  (i)      Ownership.  There shall occur a Change of Control; or

                  (j)      Insurance. The Lessee shall fail to maintain
         insurance as required by Article XIV of this Lease or to deliver any
         requisite annual



<PAGE>

         certificate with respect thereto within thirty (30) days of the date
         such certificate is due under the terms hereof; or

                  (k)      Agency Agreement Event of Default. An Agency
         Agreement Event of Default shall have occurred and be continuing; or

                  (l)      Lessee Credit Agreement Event of Default. Any Lessee
         Credit Agreement Event of Default shall have occurred and be continuing
         and shall not have been waived;

         then, in any such event, the Lessor may, in addition to the other
         rights and remedies provided for in this Article XVII and in Section
         18.1, terminate this Lease by giving the Lessee five (5) days notice of
         such termination (provided, notwithstanding the foregoing, this Lease
         shall be deemed to be automatically terminated without the giving of
         notice upon the occurrence of a Lease Event of Default under Section
         17.1(e)), and this Lease shall terminate, and all rights of the Lessee
         under this Lease shall cease. The Lessee shall, to the fullest extent
         permitted by law, pay as Supplemental Rent all costs and expenses
         incurred by or on behalf of the Lessor or any other Financing Party,
         including without limitation reasonable fees and expenses of counsel,
         as a result of any Lease Event of Default hereunder.

                  A POWER OF SALE HAS BEEN GRANTED IN THIS LEASE. A POWER OF
         SALE MAY ALLOW THE LESSOR TO TAKE THE PROPERTIES AND SELL THE
         PROPERTIES WITHOUT GOING TO COURT IN A FORECLOSURE ACTION UPON THE
         OCCURRENCE OF A LEASE EVENT OF DEFAULT.

         5.       The third sentence of Section 25.2(c) of the Lease Agreement
is hereby deleted in its entirety.

         6.       Pursuant to Section 28.1 of the Lease, by their execution of
this Amendment the Majority Secured Parties hereby consent to the replacement in
their entirety of the Incorporated Representations and Warranties, Incorporated
Covenants and Additional Incorporated Terms with the representations and
warranties, covenants and additional terms set forth in Section 6 (in the case
of the Incorporated Representations), Sections 7 and 8 (in the case of the
Incorporated Covenants) and Section 1.1 (in the case of the Additional
Incorporated Terms), respectively, of the Lessee Credit Agreement, as such term
is defined in this Amendment.

         7.       This Amendment shall be effective upon satisfaction of the
following conditions:

                  (a)      execution and delivery of this Amendment by the
         parties hereto and execution and delivery of such other documents,
         agreements or instruments deemed necessary or advisable by the Agent;


<PAGE>

                  (b) receipt by the Agent of an officer's certificate of the
         Lessee and the Construction Agent (in form and in substance reasonably
         satisfactory to the Agent) certifying that a resolution has been
         adopted by Lessee's Board of Directors approving and authorizing the
         execution, delivery, and performance of this Amendment, specifying that
         no Default or Event of Default shall have occurred and be continuing,
         specifying that the representations and warranties of Lessee set forth
         in the Participation Agreement are true and correct as of the date
         hereof (except for any such representations and warranties which relate
         solely to an earlier time) and certifying as to the incumbency of the
         officer of Lessee executing this Amendment; and

                  (c)      receipt by the Agent of the legal opinion of counsel
         to the Lessee relating to this Amendment in form and substance
         reasonably satisfactory to the Agent.

         8.       Except as modified hereby, all of the terms and provisions of
the Operative Agreements (including Schedules and Exhibits), as amended by
Amendment No. 1, Amendment No. 2 and the Forbearance Agreement, shall remain in
full force and effect.

         9.       The Lessee agrees to pay all reasonable costs and expenses of
the Agent in connection with the preparation, execution and delivery of this
Amendment, including without limitation the reasonable fees and expenses of
Moore & Van Allen, PLLC.

         10.      This Amendment may be executed in any number of counterparts,
each of which when so executed and delivered shall be deemed an original and it
shall not be necessary in making proof of this Amendment to produce or account
for more than one such counterpart.

         11.      This Amendment shall be deemed to be a contract made under,
and for all purposes shall be construed in accordance with, the laws of the
State of North Carolina.


                  [Remainder of Page Intentionally Left Blank]

<PAGE>


         IN WITNESS WHEREOF, each of the parties hereto has caused a counterpart
of this Amendment to be duly executed and delivered as of the date first above
written.


                           AAIPHARMA INC., as the Construction Agent and
                           as the Lessee


                           By:
                               -------------------------------------------------
                           Name:
                                 -----------------------------------------------
                           Title:
                                  ----------------------------------------------


                           By:
                               -------------------------------------------------
                           Name:
                                 -----------------------------------------------
                           Title:
                                  ----------------------------------------------


                           WELLS FARGO BANK NORTHWEST, N.A.
                           not individually, except as expressly stated herein,
                           but solely as the Owner Trustee under the AAI Realty
                           Trust 1998-1


                           By:
                               -------------------------------------------------
                           Name:
                                 -----------------------------------------------
                           Title:
                                  ----------------------------------------------


                           BANK OF AMERICA, N.A., as a Holder, as a Lender and
                           as the Agent


                           By:
                               -------------------------------------------------
                           Name:
                                 -----------------------------------------------
                           Title:
                                  ----------------------------------------------



                                  Amendment No 3 to the Participation Agreement,
                              the Lease Agreement and Other Operative Agreements
                                                         AAI Realty Trust 1998-1