<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