<PAGE>

                                                                  Exhibit 10.7.1

                                 THIRD AMENDMENT
                                 ---------------

                  THIRD AMENDMENT (this is "Amendment"), dated as of
December 18, 2001, among SUNOCO, INC. (f/k/a Sun Company, Inc.), a Pennsylvania
corporation (the "Company"), the Banks party to the Credit Agreement referred to
below (the "Banks"), and BANKERS TRUST COMPANY, as agent (the "Agent"). All
capitalized terms used herein and not otherwise defined herein shall have the
respective meanings provided such terms in the Credit Agreement referred to
below.

                                   WITNESSETH:
                                   ----------

                   WHEREAS, the Company, the Banks and the Agent are parties to
 a Credit Agreement, dated as of October 3, 1995 (as amended, modified and/or
 supplemented through, but not including, the date hereof, the "Credit
 Agreement"); and

                   WHEREAS, the Company has requested, and the Banks have agreed
 to, the amendments provided herein on the terms and conditions set forth
 herein;

                   NOW, THEREFORE, it is agreed:


                   1.       Section 7 of the Credit Agreement is hereby amended
by inserting the following new Section 7.14 at the end
 of such Section:

                   "7.14 Business. Notwithstanding anything to the contrary
                         --------
          contained in this Agreement, no general partner of any Excluded Entity
          will engage in any business or own any material asset or have any
          material liability other than the ownership of its general partnership
          interest in such Excluded Entity."

                   2.    The definition of "Significant Subsidiary" appearing
in Section 10 of the Credit Agreement is hereby amended by deleting the last
sentence thereof and inserting the following new last sentence in lieu thereof:

          "Notwithstanding the above, (I) the term "Significant Subsidiary"
          shall in any event include (a) [Sun Company, Inc. (R&M)], (b) Atlantic
          Petroleum Corporation, (c) any Subsidiary of any Person listed in
          clauses (a) and (b) above and (d) any Subsidiary of the Company which
          purchases any Margin Stock with the proceeds of any Loans hereunder
          and (II) the term "Significant Subsidiary", solely for purposes of
          Sections 7.06 and 7.08(a) (and not for any other purpose), shall
          exclude (a) each entity (each such entity, an "`Excluded Entity" and,
          collectively, the "Excluded Entities"; the term "Excluded Entity" to
          include, without limitation, any limited partnership, master limited
          partnership, operating limited partnership, general partnership,
          limited liability company or corporation, and, in each case, any
          Subsidiary thereof) which, upon formation, will be the

<PAGE>

          Subsidiary of the Company which succeeds to any part of the Company's
          business of, and only so long as substantially all of the business of
          such entity (and its Subsidiaries) consists of (and continues to
          consist of), crude oil and refined product pipeline operations,
          terminalling and transport operations, domestic lease crude oil
          acquisition, marketing and related trucking operations and/or any
          business related to any of the foregoing, and (b) any general partner
          of any Excluded Entity, so long as the only material asset of such
          general partner is its general partnership interest in such Excluded
          Entity."

                  3.     Section 10 of the Credit Agreement is hereby further
amended by inserting the following new definition in the appropriate
alphabetical order:

                  "Excluded Entity" shall have the meaning provided in the
          definition of "Significant Subsidiary".

                  4.     This Amendment is limited as specified and shall not
constitute a moditication, acceptance or waiver of any other provision of the
Credit Agreement or any other Credit Document.

                  5.     This Amendment may be executed in any number of
counterparts and by the different parties hereto on separate counterparts, each
of which counterparts when executed and delivered shall be an original, but all
of which shall together constitute one and the same instrument. A complete set
of counterparts shall be lodged with the Company and the Agent.

                  6.     THIS AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF
THE PARTIES HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH AND GOVERNED BY THE
LAW OF THE STATE OF NEW YORK.

                  7.     This Amendment shall become effective on the date (the
"Third Amendment Effective Date") when (i) the Company and the Required Banks
shall have signed a counterpart hereof (whether the same or different
counterparts) and shall have delivered (including by way of facsimile
transmission) the same to the Agent at the Notice Office and (ii) the Company
shall have paid to each Bank which executes and delivers to the Agent a
counterpart of this Amendment on or before 5:00 p.m. (New York time) on December
18, 2001, a fee equal to 0.075% of such Bank's Commitment on the Third Amendment
Effective Date.

                  8.     In order to induce the Banks to enter into this
Amendment, the Company hereby represents and warrants that (i) no Default or
Event of Default exists as of the Third Amendment Effective Date, both before
and after giving effect to this Amendment, and (ii) on the Third Amendment
Effective Date, both before and after giving effect to this Amendment, all
representations and warranties contained in the Credit Agreement and in the
other Credit Documents are true and correct in all material respects (it being
understood and agreed that any representation or warranty which by its terms is
made as of a specified date shall be true and correct in all material respects
only as of such specified date).

                                      -2-

<PAGE>

                  9.     From and after the Third Amendment Effective Date, all
references in the Credit Agreement and each of the Credit Documents to the
Credit Agreement shall be deemed to be references to the Credit Agreement as
modified hereby. This Amendment shall constitute a Credit Document for all
purposes under the Credit Agreement and the other Credit Documents.

                                  *     *     *


                                      -3-

<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.

                                  SUNOCO, INC. (f/k/a Sun Company, Inc.)

                                  By: /s/ Paul Mulholland
                                     ----------------------------------
                                     Name: Paul Mulholland
                                     Title: Treasurer



                                  BANKERS TRUST COMPANY,
                                      Individually and as Agent

                                  By: /s/ Marcus Tarkington
                                     ----------------------------------
                                     Name: Marcus Tarkington
                                     Title: Director



                                  JP MORGAN CHASE BANK



                                  By: /s/ Russell A. Johnson
                                     ----------------------------------
                                     Name: Russell A. Johnson
                                     Title: Vice President



                                  THE BANK OF NOVA SCOTIA



                                  By: /s/ Philip N. Adsetts
                                     ----------------------------------
                                     Name: Philip N. Adsetts
                                     Title: Managing Director


                                       4

<PAGE>

                                     BANK OF AMERICA, N.A.


                                     By:   /s/ Ronald E. McKaig
                                        --------------------------
                                        Name:  Ronald E. McKaig
                                        Title: Managing Director



                                     BANK OF SCOTLAND


                                     By:   /s/ Joseph Fratus
                                        --------------------------
                                        Name:  Joseph Fratus
                                        Title: Vice President



                                     BANK OF TOKYO-MITSUBISHI TRUST
                                       COMPANY


                                     By:   /s/ Heather Zimmermann
                                        --------------------------
                                        Name:  H. Zimmermann
                                        Title: Vice President



                                     CITIBANK, N.A.


                                     By:   /s/ Gordon Dekuyper
                                        --------------------------
                                        Name:  Gordon Dekuyper
                                        Title: Vice President



                                     CREDIT SUISSE FIRST BOSTON

                                     By:   /s/ Paul L. Colon
                                        --------------------------
                                        Name:  Paul L. Colon
                                        Title: Vice President



                                     By:   /s/ Vanena Gomez
                                        --------------------------
                                        Name:  Vanena Gomez
                                        Title: Associate


                                       5

<PAGE>

                                  FLEET BANK, N.A.



                                  By: /s/ Renee Nadlec
                                     ----------------------------------
                                     Name: Renee Nadlec
                                     Title: MD



                                  FIRST UNION NATIONAL BANK



                                  By: /s/ Alkesh V. Nanavaty
                                     ----------------------------------
                                     Name: Alkesh V. Nanavaty
                                     Title: VP



                                  KEYBANK NATIONAL ASSOCIATION



                                  By: /s/ David W. Lally
                                     ----------------------------------
                                     Name: David W. Lally
                                     Title: Assistant Vice President



                                  MELLON BANK, S.A.



                                  By: /s/ Mark W. Rogers
                                     ----------------------------------
                                     Name: Mark W. Rogers
                                     Title:



                                  ROYAL BANK OF CANADA



                                  By: /s/ Sheryl L. Greenberg
                                     ----------------------------------
                                     Name: Sheryl L. Greenberg
                                     Title: Senior Manager


                                       6

<PAGE>

                                  BANK OF MONTREAL



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


                                       7

<PAGE>


                                  THE DAI-ICHI KANGYO BANK, LTD.



                                  By: /s/ Chimie T. Pemba
                                     ----------------------------------
                                     Name: CHIMIE T. PEMBA
                                     Title: ACCOUNT OFFICER


                                       8