Document:

<PAGE>

                                                                   EXHIBIT 10.21

                     SEVENTH AMENDMENT TO CREDIT AGREEMENT

     This SEVENTH AMENDMENT TO CREDIT AGREEMENT (this "Amendment") executed
effective as of the 28th day of February, 2002 (the "Seventh Amendment Effective
Date"), is by and among ATP OIL & GAS CORPORATION, a corporation formed under
the laws of the State of Texas (the "Borrower"); each of the lenders that is a
signatory hereto or which becomes a signatory hereto and to the hereinafter
described Credit Agreement as provided in Section 12.06 of the Credit Agreement
(individually, together with its successors and assigns, a "Lender" and
collectively, the "Lenders"); and UNION BANK OF CALIFORNIA, N.A., a national
banking association as agent for the Lenders (in such capacity, together with
any successors in such capacity, the "Administrative Agent").

                                R E C I T A L S

     A.  The Borrower, the Administrative Agent and the Lenders are parties to
that certain Credit Agreement dated as of April 27, 2001 as amended and
supplemented by that certain (i) First Amendment to Credit Agreement dated as of
June 29, 2001, (ii) Second Amendment to Credit Agreement dated as of June 29,
2001, (iii) Third Amendment to Credit Agreement dated as of June 30, 2001, (iv)
Fourth Amendment to Credit Agreement dated as of October 1, 2001, (v) Fifth
Amendment to Credit Agreement dated as of November 5, 2001, and (vi) Sixth
Amendment to Credit Agreement dated as of January 31, 2002 (as so amended, the
"Credit Agreement"), pursuant to which the Lenders agreed to make loans to and
extensions of credit on behalf of the Borrower.

     B.  Subject to the terms and conditions of this Amendment, the Borrower,
the Administrative Agent and the Lenders wish to amend the Credit Agreement as
set forth herein.

     NOW THEREFORE, in consideration of the premises and the mutual covenants
herein contained, the parties hereto agree as follows:

     SECTION 1. DEFINITIONS. As used in this Amendment, each of the terms
defined in the opening paragraph and the Recitals above shall have the meanings
assigned to such terms therein. Each term defined in the Credit Agreement and
used herein without definition shall have the meaning assigned to such term in
the Credit Agreement, unless expressly provided to the contrary. The words
"hereby", "herein", "hereinafter", "hereof", "hereto" and "hereunder" when used
in this Amendment shall refer to this Amendment as a whole and not to any
particular Article, Section, subsection or provision of this Amendment.

     SECTION 2. AMENDMENTS. The Borrower, the Administrative Agent and the
Lenders agree that the Credit Agreement is hereby amended, effective as of the
Seventh Amendment Effective Date, in the following particulars:

        (a)  The following term, which is defined in Section 1.02 of the Credit
Agreement, is hereby amended in its entirety to read as follows:

                                       1
<PAGE>

     "Agreement" shall mean this Credit Agreement, as amended and supplemented
     by the First Amendment, the Second Amendment, the Third Amendment, the
     Fourth Amendment, the Fifth Amendment, the Sixth Amendment, the Seventh
     Amendment, and as the same may from time to time be further amended or
     supplemented.

        (b) Section 1.02 of the Credit Agreement is hereby further amended and
supplemented by adding the following new definition where alphabetically
appropriate, which read in its entirety as follows:

     "Seventh Amendment" shall mean that certain Seventh Amendment to Credit
     Agreement dated as of February 28, 2002, by and among the Borrower, the
     Administrative Agent and the Lenders.

        (c) Section 10.01(o) of the Credit Agreement is hereby amended by
replacing the reference to "February 28, 2002" stated therein with "March 31,
2002".

     SECTION 3. REPRESENTATIONS AND WARRANTIES. The Borrower represents and
warrants to the Administrative Agent and the Lenders that: (a) Except for such
which are made only as of a prior date, the representations and warranties set
forth in the Credit Agreement and in the other Loan Documents are true and
correct in all material respects as of the Seventh Amendment Effective Date as
if made on and as of such date; (b) the execution, delivery and performance of
this Amendment are within the corporate power and authority of the Borrower and
have been duly authorized by appropriate corporate proceedings; (c) this
Amendment constitutes a legal, valid, and binding obligation of the Borrower
enforceable in accordance with its terms, except as limited by applicable
bankruptcy, insolvency, reorganization, moratorium, or similar laws affecting
the rights of creditors generally and general principles of equity; and (d) no
consent, order, authorization, or approval or other action by, and no notice to
or filing with, any Governmental Authority or any other Person is required for
the due execution, delivery, and performance by the Borrower of this Amendment
or the consummation of the transactions contemplated thereby.

     SECTION 4. CONDITIONS TO EFFECTIVENESS: This Amendment shall become
effective and enforceable against the parties hereto and the Credit Agreement
shall be amended as provided herein upon the occurrence of the following
conditions precedent on or before the Seventh Amendment Effective Date: (a) the
Administrative Agent shall have received multiple original counterparts, as
requested by the Administrative Agent, of this Amendment duly and validly
executed and delivered by duly authorized officers of the Borrower, the
Administrative Agent and each Lender; (b) no Default or Event of Default shall
have occurred and be continuing as of the Seventh Amendment Effective Date and
no event shall have occurred or circumstance shall have arisen since September
30, 2001, which, in the reasonable opinion of the Lenders, could have a Material
Adverse Effect; (c) the Borrower shall have paid all fees and expenses of the
Administrative Agent's outside legal counsel and other consultants pursuant to
all invoices presented for payment on or prior to the Seventh Amendment
Effective Date, and (d) the Administrative Agent or any Lender or counsel to the
Administrative Agent shall have received such other instruments or documents as
any of them may reasonably request.

                                       2
<PAGE>

     SECTION 5. EFFECT ON LOAN DOCUMENTS. Each of the Borrower, the
Administrative Agent and the Lenders does hereby adopt, ratify, and confirm the
Credit Agreement, as amended hereby, and acknowledges and agrees that the Credit
Agreement, as amended hereby, is and remains in full force and effect. Nothing
herein shall act as a waiver of any of the Administrative Agent's or Lender's
rights under the Loan Documents, as amended, including the waiver of any Default
or Event of Default, however denominated. From and after the Seventh Amendment
Effective Date, all references to the Credit Agreement and the Loan Documents
shall mean such Credit Agreement and such Loan Documents as amended by this
Amendment. This Amendment is a Loan Document for the purposes of the provisions
of the other Loan Documents. Without limiting the foregoing, any breach of
representations, warranties, and covenants under this Amendment shall be a
Default or Event of Default, as applicable, under the Credit Agreement.

     SECTION 6.  COUNTERPARTS; ASSIGNS.  This Amendment (a) may be signed in any
number of counterparts, each of which shall be an original and all of which,
taken together, constitute a single instrument; (b) may be executed by facsimile
signature and all such signatures shall be effective as originals; and (c) shall
be binding upon and inure to the benefit of the parties hereto and their
respective successors and assigns permitted pursuant to the Credit Agreement.

     SECTION 7. INVALIDITY. In the event that any one or more of the provisions
contained in this Amendment shall for any reason be held invalid, illegal or
unenforceable in any respect, such invalidity, illegality or unenforceability
shall not affect any other provision of this Amendment.

     SECTION 8. TITLES OF ARTICLES, SECTIONS AND SUBSECTIONS. All titles or
headings to Articles, Sections, subsections or other divisions of this Amendment
or the exhibits hereto, if any, are only for the convenience of the parties and
shall not be construed to have any effect or meaning with respect to the other
content of such Articles, Sections, subsections, other divisions or exhibits,
such other content being controlling as the agreement among the parties hereto.

     SECTION 9. GOVERNING LAW. This Amendment shall be deemed to be a contract
made under and shall be governed by and construed in accordance with the
internal laws of the State of Texas.

THIS AMENDMENT, THE CREDIT AGREEMENT, AS AMENDED HEREBY, THE NOTES, AND THE
OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY
NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL
AGREEMENTS OF THE PARTIES.

THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                        [SIGNATURES BEGIN ON NEXT PAGE]

                                       3
<PAGE>

       IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed and delivered by their proper and duly authorized officers as of
the Seventh Amendment Effective Date.

BORROWER:                        ATP OIL & GAS CORPORATION

                                 By:    /s/ T. Paul Bulmahn
                                    --------------------------------------------
                                        T. Paul Bulmahn
                                        President

LENDER AND ADMINISTRATIVE        UNION BANK OF CALIFORNIA, N.A.
AGENT                            as Lender and as Administrative Agent

                                 By:    /s/ Damien Meiburger
                                    --------------------------------------------
                                 Name:  Damien Meiburger
                                 Title: Senior Vice President

                                 By:    /s/ Ali Ahmed
                                    --------------------------------------------
                                 Name:  Ali Ahmed
                                 Title: Vice President

                                       4<PAGE>

                                                                   EXHIBIT 10.22

                     EIGHTH AMENDMENT TO CREDIT AGREEMENT

         This EIGHTH AMENDMENT TO CREDIT AGREEMENT (this "Amendment") executed
effective as of the 27/th/ day of March, 2002 (the "Eighth Amendment Effective
Date"), is by and among ATP OIL & GAS CORPORATION, a corporation formed under
the laws of the State of Texas (the "Borrower"); each of the lenders that is a
signatory hereto or which becomes a signatory hereto and to the hereinafter
described Credit Agreement as provided in Section 12.06 of the Credit Agreement
(individually, together with its successors and assigns, a "Lender" and
collectively, the "Lenders"); and UNION BANK OF CALIFORNIA, N.A., a national
banking association as agent for the Lenders (in such capacity, together with
any successors in such capacity, the "Administrative Agent").

                                 R E C I T A L S
                                 ---------------

         A. The Borrower, the Administrative Agent and the Lenders are parties
to that certain Credit Agreement dated as of April 27, 2001 as amended and
supplemented by that certain (i) First Amendment to Credit Agreement dated as of
June 29, 2001, (ii) Second Amendment to Credit Agreement dated as of June 29,
2001, (iii) Third Amendment to Credit Agreement dated as of June 30, 2001, (iv)
Fourth Amendment to Credit Agreement dated as of October 1, 2001, (v) Fifth
Amendment to Credit Agreement dated as of November 5, 2001, (vi) Sixth Amendment
to Credit Agreement dated as of January 31, 2002, and (vii) Seventh Amendment
dated as of February 28, 2002 (as so amended, the "Credit Agreement"), pursuant
to which the Lenders agreed to make loans to and extensions of credit on behalf
of the Borrower.

         B. Subject to the terms and conditions of this Amendment, the Borrower,
the Administrative Agent and the Lenders wish to amend the Credit Agreement as
set forth herein.

         NOW THEREFORE, in consideration of the premises and the mutual
covenants herein contained, the parties hereto agree as follows:

         Section 1. Definitions. As used in this Amendment, each of the terms
                    -----------
defined in the opening paragraph and the Recitals above shall have the meanings
assigned to such terms therein. Each term defined in the Credit Agreement and
used herein without definition shall have the meaning assigned to such term in
the Credit Agreement, unless expressly provided to the contrary. The words
"hereby", "herein", "hereinafter", "hereof", "hereto" and "hereunder" when used
in this Amendment shall refer to this Amendment as a whole and not to any
particular Article, Section, subsection or provision of this Amendment.

         Section 2. Amendments. The Borrower, the Administrative Agent and the
                    ----------
Lenders agree that the Credit Agreement is hereby amended, effective as of the
Eighth Amendment Effective Date, in the following particulars:

               (a) The following term, which is defined in Section 1.02 of the
Credit Agreement, is hereby amended in its entirety to read as follows:

                                      -1-
<PAGE>

         "Agreement" shall mean this Credit Agreement, as amended and
          ---------
         supplemented by the First Amendment, the Second Amendment, the Third
         Amendment, the Fourth Amendment, the Fifth Amendment, the Sixth
         Amendment, the Seventh Amendment, Eighth Amendment, and as the same may
         from time to time be further amended or supplemented.

            (b) Section 1.02 of the Credit Agreement is hereby further amended
and supplemented by adding the following new definition where alphabetically
appropriate, which read in its entirety as follows:

         "Eighth Amendment" shall mean that certain Eighth Amendment to Credit
          ----------------
         Agreement dated as of March 27, 2002, by and among the Borrower, the
         Administrative Agent and the Lenders.

            (c) Section 10.01(o) of the Credit Agreement is hereby amended by
replacing the reference to "March 31, 2002" stated therein with "May 15, 2002".

         Section 3. Consents and Agreements Regarding Working Capital. The
                    -------------------------------------------------
Borrower, the Administrative Agent and the Lenders hereby agree that the
requirements of Section 9.13 shall not apply to the calendar months ending
December 31, 2001, January 31, 2002, February 28, 2002, March 31, 2002, April
30, 2002 and May 31, 2002 and that such Section 9.13 shall first be tested as of
the calendar month ending June 30, 2002 and shall continue for each calendar
month thereafter in accordance with such Section. Additionally, the Borrower,
the Administrative Agent and the Lenders agree that it shall constitute an Event
of Default under the Credit Agreement if the Borrower's Working Capital Deficit
shall exceed either (a) as of December 31, 2001, $10,000,000 or (b) as each of
March 31, 2002, April 30, 2002, and May 31, 2002, $5,000,000. For purposes of
the preceding sentence, "Working Capital Deficit" means the Borrower's
consolidated current liabilities (excluding current maturities under the Notes)
as of the relevant date minus its consolidated current assets (including any
unused amounts under the Borrowing Base) as of such date.

         Section 4. Amendment Fee. In consideration of the Administrative Agent
                    -------------
and the Lenders executing this Amendment, the Borrower hereby agrees to pay to
the Administrative Agent for the account of the Lenders an amendment fee
("Amendment Fee") in an aggregate amount equal to $250,000. The entire Amendment
Fee is deemed earned upon the execution and delivery by the Administrative Agent
and the Lenders of this Amendment and shall be non-refundable. The Amendment Fee
shall be paid in installments with $50,000 being due and payable concurrent with
the execution of this Agreement and the $100,000 being due and payable on April
29, 2002 and the remaining $100,000 being due and payable on May 31, 2002. This
Amendment shall not be effective unless the initial $50,000 is paid as per
Section 6(c)(i) below. Additionally, failure to pay either the $100,000 on or
before April 29, 2002 or the $100,000 installment on or before May 31, 2002
shall constitute an Event of Default under the Credit Agreement.

         Section 5. Representations and Warranties. The Borrower represents and
                    ------------------------------
warrants to the Administrative Agent and the Lenders that: (a) after giving
effect to this Amendment, except for such which are made only as of a prior
date, the representations and warranties set forth in the Credit Agreement and
in the other Loan Documents are true and correct in all

                                      -2-
<PAGE>

material respects as of the Eighth Amendment Effective Date as if made on and as
of such date; (b) the execution, delivery and performance of this Amendment are
within the corporate power and authority of the Borrower and have been duly
authorized by appropriate corporate proceedings; (c) this Amendment constitutes
a legal, valid, and binding obligation of the Borrower enforceable in accordance
with its terms, except as limited by applicable bankruptcy, insolvency,
reorganization, moratorium, or similar laws affecting the rights of creditors
generally and general principles of equity; and (d) no consent, order,
authorization, or approval or other action by, and no notice to or filing with,
any Governmental Authority or any other Person is required for the due
execution, delivery, and performance by the Borrower of this Amendment or the
consummation of the transactions contemplated thereby.

          Section 6. Conditions to Effectiveness: This Amendment shall become
                     ---------------------------
effective and enforceable against the parties hereto and the Credit Agreement
shall be amended as provided herein upon the occurrence of the following
conditions precedent on or before the Eighth Amendment Effective Date: (a) the
Administrative Agent shall have received multiple original counterparts, as
requested by the Administrative Agent, of this Amendment duly and validly
executed and delivered by duly authorized officers of the Borrower, the
Administrative Agent and each Lender; (b) no Default or Event of Default shall
have occurred and be continuing as of the Eighth Amendment Effective Date and no
event shall have occurred or circumstance shall have arisen since September 30,
2001, which, in the reasonable opinion of the Lenders, could have a Material
Adverse Effect; (c) the Borrower shall have paid (i) to the Lenders $50,000 of
the Amendment Fee described above, and (ii) all fees and expenses of the
Administrative Agent's outside legal counsel and other consultants pursuant to
all invoices presented for payment on or prior to the Eighth Amendment Effective
Date, and (d) the Administrative Agent or any Lender or counsel to the
Administrative Agent shall have received such other instruments or documents as
any of them may reasonably request.

          Section 7. Effect on Loan Documents. Each of the Borrower, the
                     ------------------------
Administrative Agent and the Lenders does hereby adopt, ratify, and confirm the
Credit Agreement, as amended hereby, and acknowledges and agrees that the Credit
Agreement, as amended hereby, is and remains in full force and effect. Nothing
herein shall act as a waiver of any of the Administrative Agent's or Lender's
rights under the Loan Documents, as amended, including the waiver of any Default
or Event of Default, however denominated. From and after the Eighth Amendment
Effective Date, all references to the Credit Agreement and the Loan Documents
shall mean such Credit Agreement and such Loan Documents as amended by this
Amendment. This Amendment is a Loan Document for the purposes of the provisions
of the other Loan Documents. Without limiting the foregoing, any breach of
representations, warranties, and covenants under this Amendment shall be a
Default or Event of Default, as applicable, under the Credit Agreement.

                                      -3-
<PAGE>

          Section 8.  Counterparts; Assigns. This Amendment (a) may be signed in
                      ---------------------
any number of counterparts, each of which shall be an original and all of which,
taken together, constitute a single instrument; (b) may be executed by facsimile
signature and all such signatures shall be effective as originals; and (c) shall
be binding upon and inure to the benefit of the parties hereto and their
respective successors and assigns permitted pursuant to the Credit Agreement.

          Section 9.  Invalidity. In the event that any one or more of the
                      ----------
provisions contained in this Amendment shall for any reason be held invalid,
illegal or unenforceable in any respect, such invalidity, illegality or
unenforceability shall not affect any other provision of this Amendment.

          Section 10. Titles of Articles, Sections and Subsections. All titles
                      --------------------------------------------
or headings to Articles, Sections, subsections or other divisions of this
Amendment or the exhibits hereto, if any, are only for the convenience of the
parties and shall not be construed to have any effect or meaning with respect to
the other content of such Articles, Sections, subsections, other divisions or
exhibits, such other content being controlling as the agreement among the
parties hereto.

          Section 11. Governing Law. This Amendment shall be deemed to be a
                      -------------
contract made under and shall be governed by and construed in accordance with
the internal laws of the State of Texas.

THIS AMENDMENT, THE CREDIT AGREEMENT, AS AMENDED HEREBY, THE NOTES, AND THE
OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY
NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL
AGREEMENTS OF THE PARTIES.

THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                        [SIGNATURES BEGIN ON NEXT PAGE]

                                      -4-
<PAGE>

         IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed and delivered by their proper and duly authorized officers as of
the Eighth Amendment Effective Date.

BORROWER:                                ATP OIL & GAS CORPORATION

                                         By: /s/ T. Paul Bulmahn
                                             -----------------------------
                                             T. Paul Bulmahn
                                             President

LENDER AND ADMINISTRATIVE                UNION BANK OF CALIFORNIA, N.A.
AGENT                                    as Lender and as Administrative Agent

                                         By: /s/ Ali Ahmed
                                             -----------------------------
                                         Name:    Ali Ahmed
                                              ----------------------------
                                         Title:   Vice President
                                               ---------------------------

                                         By:     Dustin Gaspari
                                            ------------------------------
                                         Name:   Dustin Gaspari
                                              ----------------------------
                                         Title:  Vice President
                                               ---------------------------

                                      -5-

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00036-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00036-of-00352.parquet"}]]