Document:

<PAGE>
                                                                   EXHIBIT 10.38

           FIFTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT
                [Letter of Credit and Hedged Inventory Facility]

     FIFTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT [Letter of Credit
and Hedged Inventory Facility] (this "Amendment") dated as of the 31st day of
January, 2002, by and among PLAINS MARKETING, L.P. ("Borrower"), ALL AMERICAN
PIPELINE, L.P. and PLAINS ALL AMERICAN PIPELINE, L.P., as guarantors, FLEET
NATIONAL BANK, as Administrative Agent, and the Lenders party hereto.

                              W I T N E S S E T H:

     WHEREAS, Borrower, All American, Plains MLP, Administrative Agent and
Lenders entered into that certain Amended and Restated Credit Agreement [Letter
of Credit and Hedged Inventory Facility] dated as of May 4, 2001 (as amended,
supplemented, or restated to the date hereof, the "Original Agreement") for the
purposes and consideration therein expressed, pursuant to which Lenders became
obligated to make and made loans to Borrower as therein provided; and

     WHEREAS, Borrower, All American, Plains MLP, Administrative Agent and
Lenders desire to amend the Original Agreement for the purposes described
herein;

     NOW, THEREFORE, in consideration of the premises and the mutual covenants
and agreements contained herein and in the Original Agreement, in consideration
of the loans that may hereafter be made by Lenders to Borrower, and for other
good and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereto do hereby agree as follows:

                    ARTICLE I. -- Definitions and References

     (S) 1.1.  Terms Defined in the Original Agreement.  Unless the context
otherwise requires or unless otherwise expressly defined herein, the terms
defined in the Original Agreement shall have the same meanings whenever used in
this Amendment.

     (S) 1.2.  Other Defined Terms.  Unless the context otherwise requires, the
following terms when used in this Amendment shall have the meanings assigned to
them in this (S) 1.2.

          "Amendment" means this Fifth Amendment to Amended and Restated Credit
     Agreement [Letter of Credit and Hedged Inventory Facility].

          "Amendment Documents" means this Amendment.

          "Credit Agreement" means the Original Agreement as amended hereby.

                                       1
<PAGE>

                           ARTICLE II. -- Amendments

     (S) 2.1.  Definitions.  The definition of "Consolidated Net Worth" set
forth in Section 1.1 of the Original Agreement is hereby amended in its entirety
to read as follows:

          "Consolidated Net Worth" means the remainder of all Consolidated
     assets, as determined in accordance with GAAP, of Plains MLP and its
     Subsidiaries minus the sum of (i) Plains MLP's Consolidated liabilities, as
     determined in accordance with GAAP, and (ii) the book value of any equity
     interests in any of Plains MLP's Subsidiaries which equity interests are
     owned by a Person other than Plains MLP or a Wholly Owned Subsidiary of
     Plains MLP.  The effect of any increase or decrease of net worth in any
     period as a result of items of income or loss not reflected in the
     determination of net income but reflected in the determination of
     comprehensive income (to the extent provided under GAAP as in effect on the
     date hereof) shall be excluded in determining Consolidated Net Worth.

     The definition of "Permitted Acquisitions" set forth in Section 1.1 of the
Original Agreement is hereby amended in its entirety to read as follows:

          "Permitted Acquisitions" means (A) the acquisition of the capital
     stock or other equity interest in a Person whose business, assets and
     operations consist of Petroleum Products and/or gas marketing, gathering,
     transportation, storage, terminaling and pipeline operation; provided, if a
     Restricted Person acquires less than all of the capital stock or other
     equity interest acquired, such business, assets and operations shall
     consist of transportation, storage, terminaling and/or pipeline operations
     and associated gathering assets, or (B) the acquisition of all or a portion
     of a line of business or the business, assets or operations of a Person
     (whether in a single transaction or a series of related transactions)
     consisting of Petroleum Products and/or gas marketing, gathering,
     transportation, storage, terminaling and pipeline operation; provided, if a
     Restricted Person acquires less than all of the ownership interest of the
     business, assets or operations acquired, such business, assets and
     operations shall consist of transportation, storage, terminaling and/or
     pipeline operations and associated gathering assets; provided, further, in
     each case under clauses (A) and (B) above (i) prior to and after giving
     effect to such acquisition no Default or Event of Default shall have
     occurred and be continuing; and (ii) all representations and warranties
     shall be true and correct as if restated immediately following the
     consummation of such acquisition, except to the extent that any such
     representation or warranty was made as of a specific date or updated,
     modified or supplemented as of a subsequent date with the consent of
     Majority Lenders.

     The definition of "Permitted Investments" set forth in Section 1.1 of the
Original Agreement is hereby amended in its entirety to read as follows:

     "Permitted Investments" means:

          (a) Cash Equivalents,

                                       2
<PAGE>

          (b) Investments described in the Disclosure Schedule,

          (c) Investments by Plains MLP or any of its Subsidiaries in (1) any
     Wholly Owned Subsidiary of Plains MLP which is (or substantially
     contemporaneously with such Investment will become) Borrower or a
     Guarantor, or (2) any business, asset or operation which is (or
     contemporaneously with such Investment becomes) wholly-owned by Plains MLP
     or any Wholly Owned Subsidiary of Plains MLP which is (or substantially
     contemporaneously with such Investment will become) Borrower or a
     Guarantor,

          (d) Investments in publicly traded units of master limited
     partnerships whose dividends are "qualifying income" as such term is
     defined in Section 7704 of the Code (provided, the amount of any such
     Investments under this clause (d) minus any amounts received on such
     Investments (excluding dividends thereon) shall not at any time exceed the
     Dollar Equivalent of $5,000,000),

          (e) Permitted Acquisitions,

          (f) Investments by Plains MLP or any of its Subsidiaries in (i) any
     Person owning transportation, terminaling, storage and/or pipeline assets
     and associated gathering assets in which Plains MLP or any Wholly Owned
     Subsidiary of Plains MLP owns, directly or indirectly, less than all of the
     capital stock or other equity interest, or (ii) transportation,
     terminaling, storage and/or pipeline assets and associated gathering assets
     in which Plains MLP or any Wholly Owned Subsidiary of Plains MLP owns,
     directly or indirectly, less than all of the ownership interest therein,
     such Investments under clauses (i) and (ii) above in an aggregate amount
     not to exceed at any one time outstanding (A) the Dollar Equivalent of
     $35,000,000 minus (B) any outstanding Indebtedness under Section
     7.1(f)(ii),

          (g) subject to Section 7.18(d), Investments directly or indirectly by
     Restricted Persons in Unrestricted Subsidiaries (i) consisting of Qualified
     Equity Proceeds, and (ii) Investments other than Qualified Equity Proceeds
     in an aggregate amount not to exceed, at any one time outstanding, the
     Dollar Equivalent of $100,000,000; for calculation purposes hereof: (1) any
     return on investment from any Unrestricted Subsidiary shall reduce the
     aggregate outstanding Investments subject to the limitation set forth in
     clause (ii) by an amount equal to the Non-Equity Investment to Total
     Investment Ratio times such investment return (e.g., if an Unrestricted
     Subsidiary is capitalized with $100,000,000, $40,000,000 of which is
     Qualified Equity Proceeds and $60,000,000 of which is subject to the
     limitation set forth in clause (ii), and $10,000,000 is returned by such
     Unrestricted Subsidiary, the $60,000,000 subject to clause (ii) would be
     reduced by 6/10ths or $6,000,000 of such return); (2) in the event any
     Unrestricted Subsidiary is designated a Restricted Person pursuant to
     Section 7.18, executes and delivers Security Documents pursuant to Section
     6.14 and becomes a Guarantor pursuant to Section 6.17, the aggregate
     outstanding Investments subject to the limitation set forth in clause (ii)
     shall be reduced by the lesser of (i) Investments in such redesignated
     Subsidiary not constituting Qualified Equity Proceeds and (ii) the Non-
     Equity Investment to Total Investment Ratio times the fair market value of
     such redesignated Subsidiary as of the

                                       3
<PAGE>

     date of such designation as a Restricted Person, as reasonably determined
     by Borrower; as used herein, "Qualified Equity Proceeds" means proceeds of
     private or public offerings of equity securities by Restricted Persons
     after January 31, 2002 that within three months after the receipt thereof
     are (1) contributed as capital to one or more specified Unrestricted
     Subsidiaries, or (2) expressly designated as funds to be contributed as
     capital to one or more specified Unrestricted Subsidiaries, and are
     contributed pursuant to such designation within six months after such
     designation, and "Non-Equity Investment to Total Investment Ratio" means
     with respect to any Unrestricted Subsidiary, the ratio of (I) Investments
     in such Unrestricted Subsidiary not constituting Qualified Equity Proceeds
     to (II) all Investments in such Unrestricted Subsidiary, and

          (h) other Investments, excluding Investments in Unrestricted
     Subsidiaries, such other Investments not to exceed in the aggregate in
     respect of all Restricted Persons the Dollar Equivalent of $10,000,000.

     The definition of "Restricted Person" set forth in Section 1.1 of the
Original Agreement is hereby amended in its entirety to read as follows:

          "Restricted Person" means any of Plains MLP and each Subsidiary of
     Plains MLP, including but not limited to Borrower, All American, and each
     Subsidiary of Borrower and All American, but excluding, for the avoidance
     of doubt, Unrestricted Subsidiaries.

     The following definition of "Restriction Exception" is hereby added to
Section 1.1 of the Original Agreement in appropriate alphabetical order:

          "Restriction Exception" means (i) any instrument governing
     Indebtedness or equity interests, or any other agreement relating to any
     property or assets, of a Person whose capital stock or other equity
     interests are partially acquired by a Restricted Person pursuant to a
     Permitted Acquisition, as such instrument or agreement is in effect at the
     time of such acquisition (except with respect to Indebtedness incurred in
     connection with, or in contemplation of, such acquisition), which is not
     applicable to any Restricted Person, or the property or assets of any
     Restricted Person, other than the partially-acquired Person, or the
     property or assets of such partially-acquired Person or such partially-
     acquired Person's Subsidiaries; provided that in the case of Indebtedness,
     such Indebtedness is permitted hereunder, or (ii) provisions with respect
     to the disposition or distribution of assets in joint venture agreements or
     other similar agreements entered into in the ordinary course of business.

     The definition of "Subsidiary" set forth in Section 1.1 of the Original
Agreement is hereby amended in its entirety to read as follows:

          "Subsidiary" means, with respect to any Person, any corporation,
     association, partnership, limited liability company, joint venture, or
     other business or corporate entity, enterprise or organization which is
     directly or indirectly (through one or more intermediaries) controlled or
     owned more than fifty percent by such Person; provided,

                                       4
<PAGE>

     however, that no Unrestricted Subsidiary shall be deemed a "Subsidiary" of
     Plains MLP or any Subsidiary of Plains MLP for purposes of any Loan
     Document except as provided in Section 7.18.

     The following definition of "Unrestricted Subsidiary" is hereby added to
Section 1.1 of the Original Agreement in appropriate alphabetical order:

          "Unrestricted Subsidiary" shall have the meaning given it in Section
7.18.

     (S) 2.2.  Agreement to Deliver Security Documents.   Section 6.14 of the
Original Agreement is hereby amended in its entirety to read as follows:

          Section 6.14.  Agreement to Deliver Security Documents.  Restricted
     Persons will deliver, and will cause each Person, other than Unrestricted
     Subsidiaries, in which it owns any capital stock or other equity interest
     (other than interests described in clause (d) of the definition of
     "Permitted Investments") to deliver, to further secure the Obligations
     whenever requested by Administrative Agent in its sole and absolute
     discretion, deeds of trust, mortgages, chattel mortgages, security
     agreements, financing statements and other Security Documents in form and
     substance satisfactory to Administrative Agent for the purpose of granting,
     confirming, and perfecting first and prior liens or security interests in
     any real or personal property now owned or hereafter acquired by any
     Restricted Person; provided, with respect to any such property for which
     the consent or approval of third parties is required for the delivery of
     such Security Documents, Restricted Persons shall not be required to
     deliver, or to cause such Person to deliver, such Security Documents with
     respect to such property, but shall use their commercially reasonable best
     efforts, as determined by Administrative Agent, to deliver, or to cause
     such Person to deliver, such Security Documents with respect to such
     property.  Without limiting the foregoing, each  Restricted Person shall be
     required to grant a Lien in favor of Administrative Agent for the benefit
     of Lenders encumbering such Restricted Person's ownership interest in any
     Unrestricted Subsidiary; provided, no Security Document granting any such
     Lien on such ownership interest in such Unrestricted Subsidiary shall
     restrict or limit the ownership or operation of such Unrestricted
     Subsidiary except as otherwise restricted or limited herein.

     (S) 2.3.  Guaranties of Subsidiaries.  The first sentence of Section 6.17
of the Original Agreement is hereby amended in its entirety to read as follows:

     Each Subsidiary of Plains MLP, and any other Person, other than
     Unrestricted Subsidiaries, in which any Subsidiary of Plains MLP owns any
     capital stock or other equity interest (other than interests described in
     clause (d) of the definition of "Permitted Investments"), now existing or
     created, acquired or coming into existence after the date hereof shall,
     promptly upon request by Administrative Agent, execute and deliver to
     Administrative Agent an absolute and unconditional guaranty of the timely
     repayment of the Obligations and the due and punctual performance of the
     obligations of Borrower hereunder (in each case for which such Subsidiary
     is not a borrower, account party or similar primary and direct obligor),
     which guaranty shall be satisfactory to Administrative Agent in form and
     substance; provided, with respect to any such Subsidiary or other Person
     that is not a Wholly Owned Subsidiary of Plains MLP, for which consent or

                                       5
<PAGE>

     approval of third parties is required for the delivery of such guaranty,
     such Subsidiary or such other Person shall not be required to deliver such
     guaranty, but shall use its commercially reasonable best efforts, as
     determined by Administrative Agent, to deliver such guaranty.
     Notwithstanding any provision contained herein, in no event shall any
     Unrestricted Subsidiary be required to execute and deliver any guaranty
     for, or in respect of, the Obligations, or any part thereof.

     (S) 2.4.  Limitation on Indebtedness.  Section 7.1(f) of the Original
Agreement is hereby amended in its entirety to read as follows:

          (f) guaranties by Plains MLP, Borrower or any Guarantor of trade
     payables incurred and paid in the ordinary course of business on ordinary
     trade terms by (A) any Restricted Person, or (B) any other Person in which
     Plains MLP or any Wholly Owned Subsidiary of Plains MLP owns less than all
     of such Person's capital stock or other equity interest; provided, that the
     outstanding trade payables amount guaranteed at any time under this clause
     (B) shall not exceed (1) $50,000,000 minus (2) any outstanding Investments
     under clause (f) of the definition of Permitted Investments.

     (S) 2.5.  Limitation on Liens.  The reference to "Section 7.1(g)" set forth
in Section 7.2(i) of the Original Agreement is hereby amended to refer instead
to "Section 7.1(h)".

     (S) 2.6.  Limitations on Mergers; Issuances of Securities.  The second,
third and fourth sentences of Section 7.4 are hereby amended in their entirety
to read as follows:

     Any Person, other than Borrower, that is a Subsidiary of a Restricted
     Person may, however, be merged into or consolidated with (i) another
     Subsidiary of such Restricted Person, so long as (A) neither is a
     Guarantor, or (B) a Guarantor is the surviving business entity, (ii) such
     Restricted Person, so long as such Restricted Person is the surviving
     business entity, or (iii) any other Person pursuant or incidental to, or in
     connection with, any contemporaneous or substantially contemporaneous
     Permitted Acquisition, provided that such merging or consolidating
     Subsidiary (1) is not Borrower, Guarantor or a Wholly Owned Subsidiary of
     Plains MLP, other than a Wholly Owned Subsidiary that was formed, acquired
     or created solely for purposes of such acquisition or otherwise conducted
     no operations and owned no assets, other than of an inconsequential amount
     and (2) does not own any Collateral.  Plains MLP will not issue any
     securities other than (i) limited partnership interests and any options or
     warrants giving the holders thereof only the right to acquire such
     interests, (ii) general partnership interests to General Partner, and (iii)
     debt securities permitted by Section 7.1(g).  No Subsidiary of Plains MLP
     will issue any additional shares of its capital stock, partnership
     interests or other securities or any options, warrants or other rights to
     acquire such additional shares, partnership interests or other securities,
     except a Subsidiary of a Restricted Person may issue additional shares,
     partnership interests or other securities (i) to Persons so long as such
     Restricted Person's and Plains MLP's aggregate ownership in such issuing
     Subsidiary is not diminished after giving effect thereto, or (ii) to any
     other Person pursuant or incidental to, or in connection with, any
     contemporaneous or substantially contemporaneous Permitted Acquisition,
     provided that such issuing Subsidiary (1) is not

                                       6
<PAGE>

     Borrower, Guarantor or a Wholly Owned Subsidiary of Plains MLP, other than
     a Wholly Owned Subsidiary that was formed, acquired or created solely for
     purposes of such acquisition or otherwise conducted no operations and owned
     no assets, other than of an inconsequential amount and (2) does not own any
     Collateral.

     The fifth sentence of Section 7.4 is hereby deleted in its entirety.

     (S) 2.7.  Limitation on Sales of Property.  Section 7.5 of the Original
Agreement is hereby amended by deleting "and" at the end of clause (c), adding
an amended clause (d) as follows:

          (d) in exchange for other property; provided that (i) such exchange is
     for fair consideration, (ii) the property to be acquired in such exchange
     constitutes a Permitted Acquisition, (iii) the fair market value of such
     property being exchanged is not in the aggregate in excess of the Dollar
     Equivalent of $25,000,000 in any Fiscal Year, as reasonably determined by
     Borrower (any such determination in excess of $10,000,000 being determined
     in good faith by certified resolution of the board of directors of the
     corporate general partner of Borrower and subject to, at Administrative
     Agent's reasonable request, confirmation by appraisal), and (iv) such
     exchange will not materially impair or diminish the value of the Collateral
     or any Restricted Person's financial condition, business or operations; and

and redesignating existing clause "(d)" as clause "(e)".

     The first sentence following such new clause (d) and redesignated clause
(e) of Section 7.5 is hereby amended in its entirety to read as follows:

     No Restricted Person will sell, transfer or otherwise dispose of capital
     stock of or interest in any of its Subsidiaries except (i) to Plains MLP or
     a Wholly Owned Subsidiary of Plains MLP or (ii) to any other Person
     pursuant or incidental to, or in connection with, any contemporaneous or
     substantially contemporaneous Permitted Acquisition, provided that such
     Subsidiary whose capital stock or interests are being transferred (1) is
     not Borrower, Guarantor or a Wholly Owned Subsidiary of Plains MLP, other
     than a Wholly Owned Subsidiary that was formed, acquired or created solely
     for purposes of such acquisition or otherwise conducted no operations and
     owned no assets, other than of an inconsequential amount and (2) does not
     own any Collateral; provided, in the event any limited partner interests
     issued by Plains Marketing Canada, L.P. to CanPet Energy Group (USA), Inc.
     or CanPet Energy Group Inc. pursuant to Section 7.4 are exchanged for units
     issued by Plains MLP, Lenders hereby consent to the contribution by Plains
     MLP to Borrower of any and all such partnership interests.

     The reference to "clause (a) or (c)" in the last sentence of Section 7.5 is
hereby amended to refer instead to "clauses (a), (c) or (d)".

     (S) 2.8.  Limitation on Dividends and Redemptions.  The first sentence of
Section 7.6 of the Original Agreement is hereby amended in its entirety to read
as follows:

                                       7
<PAGE>

          Section 7.6  Limitation on Dividends and Redemptions.  No Restricted
     Person will declare or pay any dividends on, or make any other distribution
     in respect of, any class of its capital stock or any partnership, limited
     liability company or other interest in it, nor will any Restricted Person
     directly or indirectly purchase, redeem, acquire or retire (or make any
     capital contribution to purchase, redeem, acquire or retire) any shares of
     the capital stock of or partnership or limited liability company interests
     in any Restricted Person (whether such interests are now or hereafter
     issued, outstanding or created), or cause or permit any reduction or
     retirement of the capital stock of any Restricted Person, while any Loan or
     any Commitment is outstanding.

     (S) 2.9.  Prohibited Contracts.  The reference to "as described in the
Disclosure Schedule" set forth in the first sentence of Section 7.10 of the
Original Agreement is hereby amended to refer instead to "as described in the
Disclosure Schedule or pursuant to a Restriction Exception, the substance of
which, in detail satisfactory to Administrative Agent, is promptly reported to
Administrative Agent".

     (S) 2.10.  Debt Coverage Ratio.  Section 7.12 of the Original Agreement is
hereby amended in its entirety to read as follows:

          Section 7.12  Debt Coverage Ratio.  (a) At the end of any Fiscal
     Quarter, (b) on any date on which General Partner declares a distribution
     permitted under Section 7.6 and (c) on the date of any Permitted
     Acquisition, both immediately prior to and after giving effect to the
     consummation thereof, the Debt Coverage Ratio will not be greater than 4.00
     to 1.0.  As used herein, "Debt Coverage Ratio" means the ratio of (a)
     Consolidated Funded Indebtedness to (b) Consolidated EBITDA for the four
     Fiscal Quarter period (or other period specified below) most recently ended
     prior to the date of determination for which financial statements
     contemplated by Section 6.2(a) or (b) are available to Borrower; provided,
     for purposes of this Section 7.12, if, since the beginning of the four
     Fiscal Quarter period ending on the date for which Consolidated EBITDA is
     determined, any Restricted Person shall have made any asset disposition or
     acquisition, shall have consolidated or merged with or into any Person
     (other than another Restricted Person), or shall have made any disposition
     or acquisition of a Restricted Person or disposition or acquisition of any
     partial ownership interest in any other Person, Consolidated EBITDA shall
     be calculated giving pro forma effect thereto as if the disposition,
     acquisition, consolidation or merger had occurred on the first day of such
     period; provided, with respect to any Person not constituting a Subsidiary
     of Plains MLP, such pro forma calculation of Consolidated EBITDA, with
     respect to any such Person, shall be limited to not more than 75% of (i)
     such Restricted Person's ownership interest in such Person times (ii) the
     difference of such Person's (A) Consolidated EBITDA minus (B) Interest
     Expense and capital expenditures.  Such pro forma effect shall include
     adjustments with respect to management fees previously distributed with
     respect to the assets subject to the CanPet Acquisition and the acquisition
     of the remaining 50% of the Manito Pipeline in mid calendar year 2000, and
     shall otherwise be determined (i) in good faith by the chief financial
     officer of Borrower, and (ii) without giving effect to any anticipated or
     proposed change in operations, revenues, expenses or other items included
     in the computation of Consolidated EBITDA, except with the consent of
     Majority Lenders.

                                       8
<PAGE>

     (S) 2.11.  Unrestricted Subsidiaries.  Article VII of the Original
Agreement is hereby amended by adding a new Section 7.18 at the end thereof, to
read as follows:

          Section 7.18  Unrestricted Subsidiaries.  Plains MLP or any Wholly
     Owned Subsidiary of Plains MLP may designate one or more direct
     Subsidiaries that are not Borrower or Guarantors (each such Subsidiary, and
     each of its Subsidiaries, each an "Unrestricted Subsidiary"), which
     Unrestricted Subsidiaries shall be subject to the following:

     (a)  No Unrestricted Subsidiary shall be deemed to be a "Restricted Person"
          or a "Subsidiary" of Plains MLP for purposes of this Agreement or any
          other Loan Document, and no Unrestricted Subsidiary shall be subject
          to or included within the scope of any provision herein or in any
          other Loan Document, including without limitation any representation,
          warranty, covenant or Event of Default  herein or in any other Loan
          Document, except as set forth in this Section 7.18.

     (b)  No Restricted Person shall guarantee or otherwise become liable in
          respect of any Liability or other obligation of, grant any Lien on any
          of its property to secure any Liability or other obligation of, make
          any Investment in (except as described in clause (g) of the definition
          of  Permitted Investments), or provide any other form of credit
          support to, any Unrestricted Subsidiary, and no Restricted Person
          shall enter into any contract or agreement with any Unrestricted
          Subsidiary, except in the course of ordinary business on terms no less
          favorable to such Restricted Person, as applicable, than could be
          obtained in a comparable arm's length transaction with a non-Affiliate
          of such Restricted Person.

     (c)  Borrower shall at all times maintain, as between Restricted Persons
          and Unrestricted Subsidiaries, the separate existence of each
          Unrestricted Subsidiary.

     (d)  No Restricted Person shall make any Investment in any Unrestricted
          Subsidiary pursuant to clause(g) of the definition of "Permitted
          Investment" except in connection with the capitalization of an
          Unrestricted Subsidiary to consummate a proposed acquisition,
          disclosed to Administrative Agent in writing, of (1) the acquisition
          of the capital stock or other equity interest in a Person whose
          business, assets and operations consist of Petroleum Products and/or
          gas marketing, gathering, transportation, storage, terminaling and
          pipeline operation; provided, if a Restricted Person acquires less
          than all of the capital stock or other equity interest acquired, such
          business, assets and operations shall consist of transportation,
          storage, terminaling and/or pipeline operations and associated
          gathering assets, or (2) the acquisition of all or a portion of a line
          of business or the business, assets or operations of a Person (whether
          in a single transaction or a series of related transactions)
          consisting of Petroleum Products and/or gas marketing, gathering,
          transportation, storage, terminaling and pipeline operation; provided,
          if a Restricted Person acquires less than all of the ownership
          interest of the business, assets or operations acquired, such
          business, assets and operations

                                       9
<PAGE>

          shall consist of transportation, storage, terminaling and/or pipeline
          operations and associated gathering assets; provided, further, the
          aggregate amount of any such Permitted Investments in such
          Unrestricted Subsidiary in excess of the purchase price and associated
          acquisition costs relating to such acquisition shall, promptly
          following the consummation of such acquisition, be distributed back to
          such investing Restricted Person.  In the event such Unrestricted
          Subsidiary shall fail to timely consummate such specified acquisition
          or such specified acquisition shall otherwise be abandoned, such
          Unrestricted Subsidiary shall be deemed to be a "Subsidiary" of Plains
          MLP for purposes of this Agreement and shall be subject to the terms
          and conditions hereof.

     (e)  Restricted Persons shall notify each Lender Party, not later than five
          (5) Business Days after any executive officer of Restricted Persons
          has knowledge of, under any Environmental Law, any claim of the Dollar
          Equivalent of $1,000,000 or more, any notice of potential liability
          which might be reasonably likely to exceed such amount, or any other
          material adverse claim thereunder asserted against any Unrestricted
          Subsidiary or with respect to any Unrestricted Subsidiary's
          properties, stating that such notice is being given pursuant to this
          Section 7.18.

     The board of directors of the corporate general partner of the Borrower may
     designate any Unrestricted Subsidiary to become a Restricted Person if a
     Default or Event of Default is not continuing, such designation would not
     result in a Default or an Event of Default, and immediately thereafter such
     Subsidiary has no outstanding Indebtedness.  Immediately thereafter,
     Borrower shall promptly notify the Administrative Agent of such designation
     and provide to it an officer's certificate that such designation was made
     in compliance with this Section 7.18.

                  ARTICLE III. -- Conditions of Effectiveness

     (S) 3.1.  Effective Date. This Amendment shall become effective as of the
date first written above, when and only when:

          (i) Administrative Agent shall have received, at Administrative
     Agent's office (A) a counterpart of this Amendment executed and delivered
     by Borrower, Plains MLP, All American and Majority Lenders, and (B) a
     contemporaneous amendment to the Revolver Agreement, amending various
     provisions therein consistent with the amendments set forth herein, in form
     and substance acceptable to Administrative Agent, executed and delivered by
     such Persons so as to make such amendment effective,

          (ii) in consideration hereof Borrower shall have paid to
     Administrative Agent for the account of each Lender executing and
     delivering this Amendment an amendment fee in immediately available funds
     equal to one-twentieth of one percent (0.05%) of each such Lender's
     Percentage Share of the Maximum Facility Amount; and

          (iii) Administrative Agent shall have additionally received all of the
     following documents, each document (unless otherwise indicated) being dated
     the date of receipt

                                       10
<PAGE>

     thereof by Administrative Agent, duly authorized, executed and delivered,
     and in form and substance satisfactory to Administrative Agent:

               (A) Officer's Certificate.  A certificate of a duly authorized
          officer of General Partner, to the effect that all of the
          representations and warranties set forth in Article IV hereof are true
          and correct at and as of the date thereof, and

               (B) Supporting Documents.  Such supporting documents as
          Administrative Agent may reasonably request.

                 ARTICLE IV. -- Representations and Warranties

     (S) 4.1.  Representations and Warranties of Plains MLP and Borrower.  In
order to induce Administrative Agent and Lenders to enter into this Amendment,
Plains MLP and Borrower represent and warrant to Administrative Agent and each
Lender that:

          (a) The representations and warranties contained in Article V of the
     Original Agreement are true and correct at and as of the time of the
     effectiveness hereof, except to the extent that such representation and
     warranty was made as of a specific date.

          (b) Each Restricted Person is duly authorized to execute and deliver
     this Amendment and each other Amendment Document, to the extent a party
     thereto, and each Borrower is and will continue to be duly authorized to
     borrow and perform its obligations under the Credit Agreement.  Each
     Restricted Person has duly taken all action necessary to authorize the
     execution and delivery of this Amendment and each other Amendment Document,
     to the extent a party thereto, and to authorize the performance of their
     respective obligations hereunder.

          (c) The execution and delivery by each Restricted Person of this
     Amendment and each other Amendment Document, to the extent a party thereto,
     the performance by each Restricted Person of its respective obligations
     hereunder and thereunder, and the consummation of the transactions
     contemplated hereby and thereby, do not and will not conflict with any
     provision of any Law or of the organizational documents of any Restricted
     Person, or of any material agreement, judgment, license, order or permit
     applicable to or binding upon any Restricted Person, or result in the
     creation of any Lien upon any assets or properties of any Restricted
     Person, except in favor of Administrative Agent for the benefit of Lenders
     and other Permitted Liens.  Except for those which have been duly obtained,
     no consent, approval, authorization or order of any Tribunal or third party
     is required in connection with the execution and delivery by any Restricted
     Person of this Amendment or any other Amendment Document, or to consummate
     the transactions contemplated hereby and thereby.

          (d)  When duly executed and delivered, each of this Amendment and each
     other Amendment Document, and each of the Loan Documents, as amended hereby
     and thereby, will be a legal and binding instrument and agreement of each
     Restricted Person to the extent a party thereto, enforceable in accordance
     with its terms, (subject, as to

                                       11
<PAGE>

     enforcement of remedies, to applicable bankruptcy, insolvency and similar
     laws applicable to creditors' rights generally).

                          ARTICLE V. -- Miscellaneous

     (S) 5.1.  Ratification of Agreements.  The Original Agreement, as hereby
amended, is hereby ratified and confirmed in all respects.  The Loan Documents
(including but not limited to each Guaranty), as they may be amended or affected
by this Amendment or any other Amendment Document, are hereby ratified and
confirmed in all respects by each Restricted Person to the extent a party
thereto.  Any reference to the Credit Agreement in any Loan Document shall be
deemed to refer to this Amendment also.   The execution, delivery and
effectiveness of this Amendment and the other Amendment Documents shall not,
except as expressly provided herein, operate as a waiver of any right, power or
remedy of Administrative Agent or any Lender under the Credit Agreement or any
other Loan Document nor constitute a waiver of any provision of the Credit
Agreement or any other Loan Document.

     (S) 5.2.  Ratification of Security Documents.  Restricted Persons,
Administrative Agent, and Lenders each acknowledge and agree that any and all
indebtedness, liabilities or obligations arising under or in connection with the
LC Obligations or the Notes are Obligations and are secured indebtedness under,
are guarantied by, and are secured by, each and every Security Document to which
any Restricted Person is a party.  Each Restricted Person hereby re-pledges, re-
grants and re-assigns a security interest in and lien on every asset of the such
Restricted Person described as Collateral in any Security Document and re-
guarantees all Obligations under the Credit Agreement.

     (S) 5.3.  Ratification of Intercreditor Agreement.  Each Lender hereby
acknowledges and confirms that all Obligations under the Credit Agreement, as
amended hereby, and the "Obligations" under the Marketing Credit Agreement, as
amended on the date hereof, shall be and shall remain subject to the terms and
entitled to the benefits of the Intercreditor Agreement.

     (S) 5.4.  Survival of Agreements.  All representations, warranties,
covenants and agreements of the Restricted Persons herein shall survive the
execution and delivery of this Amendment and the performance hereof, including
without limitation the making or granting of each Loan, and shall further
survive until all of the Obligations under the Credit Agreement are paid in
full.  All statements and agreements contained in any certificate or instrument
delivered by any Restricted Person hereunder or under the Credit Agreement to
Administrative Agent or any Lender shall be deemed to constitute representations
and warranties by, or agreements and covenants of, such Restricted Person under
this Amendment and under the Credit Agreement.

     (S) 5.5.  Loan Documents.  This Amendment and each other Amendment Document
is a Loan Document, and all provisions in the Credit Agreement pertaining to
Loan Documents apply hereto.

     (S) 5.6.  GOVERNING LAW.  THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED
IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW

                                       12
<PAGE>

YORK AND ANY APPLICABLE LAWS OF THE UNITED STATES OF AMERICA IN ALL RESPECTS,
INCLUDING CONSTRUCTION, VALIDITY AND PERFORMANCE.

     (S) 5.7.  Counterparts.  This Amendment may be separately executed in
counterparts and by the different parties hereto in separate counterparts, each
of which when so executed shall be deemed to constitute one and the same
Amendment.

                                       13
<PAGE>

     IN WITNESS WHEREOF, this Amendment is executed as of the date first above
written.

BORROWER:                     PLAINS MARKETING, L.P.

                              By:  Plains Marketing GP Inc., General Partner

                              By:   /s/ Phil Kramer
                                    -------------------------------------
                                    Phil Kramer, Exec. Vice President

GUARANTORS:                   ALL AMERICAN PIPELINE, L.P.

                              By:  Plains Marketing GP Inc., General Partner

                              By:   /s/ Phil Kramer
                                    -------------------------------------
                                    Phil Kramer, Exec. Vice President

                              PLAINS ALL AMERICAN PIPELINE, L.P.

                              By:  Plains AAP, L.P., General Partner

                              By:  Plains All American LLC, General Partner

                              By:   /s/ Phil Kramer
                                    -------------------------------------
                                    Phil Kramer, Exec. Vice President

                                       14
<PAGE>

LENDER PARTIES:               FLEET NATIONAL BANK,
                              Administrative Agent, LC Issuer and Lender

                              By:   /s/  Terrence Ronan
                                    -------------------------------------
                                    Terrence Ronan, Managing Director

                              FIRST UNION NATIONAL BANK, Lender

                              By:   /s/  Robert R. Wetteroff
                                    -------------------------------------
                                    Robert R. Wetteroff, Sr. Vice Pres.

                              BANK OF AMERICA, N.A., Lender

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

                              BANK ONE, NA, Lender

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

                              FORTIS CAPITAL CORP., Lender

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

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

                              U.S. BANK NATIONAL ASSOCIATION, Lender

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

                              BANK OF SCOTLAND, Lender

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

                                       15
<PAGE>

                              WELLS FARGO BANK (TEXAS),
                              NATIONAL ASSOCIATION, Lender

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

                              THE BANK OF NOVA SCOTIA, Lender

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

                              CREDIT AGRICOLE INDOSUEZ, Lender

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

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

                              TORONTO DOMINION (TEXAS), INC., Lender

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

                              SOUTHWEST BANK OF TEXAS, N.A., Lender

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

                              UNION BANK OF CALIFORNIA, N.A., Lender

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

                                       16
<PAGE>

                              COMERICA BANK-TEXAS, Lender

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

                              BNP PARIBAS, Lender

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

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

                              GUARANTY BANK, Lender

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

                              SIEMENS FINANCIAL SERVICES INC., Lender

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

                                       17
<PAGE>

                             CONSENT AND AGREEMENT

     Each of the undersigned hereby consents to the provisions of this Amendment
and the transactions contemplated herein and hereby (i) acknowledges and agrees
that any and all indebtedness, liabilities or obligations arising under or in
connection with the Notes are Obligations and are secured indebtedness under,
and are secured by, each and every Security Document to which it is a party,
(ii) re-pledges, re-grants and re-assigns a security interest in and lien on all
of its assets described as collateral in any Security Document, (iii) ratifies
and confirms its Guaranty dated May 4, 2001 made by it for the benefit of
Administrative Agent and Lenders, and (iv) expressly acknowledges and agrees
that the undersigned guarantees all indebtedness, liabilities and obligations
arising under or in connection with any and all Notes pursuant to the terms of
such Guaranty, and agrees that its obligations and covenants thereunder are
unimpaired hereby and shall remain in full force and effect.

                              PLAINS MARKETING CANADA LLC

                              By:  Plains Marketing, L.P., its sole member

                                    By:  Plains Marketing GP Inc.,
                                         its general partner

                                    By:   /s/ Phil Kramer
                                       -------------------------------------
                                       Phil Kramer, Exec. Vice President

                              PMC (NOVA SCOTIA) COMPANY

                              By:   /s/ Phil Kramer
                                   -------------------------------------
                                   Phil Kramer, Exec. Vice President

                              PLAINS MARKETING CANADA, L.P.

                              By:  PMC (Nova Scotia) Company,
                                    General Partner

                              By:   /s/ Phil Kramer
                                   -------------------------------------
                                   Phil Kramer, Exec. Vice President

                                       18<PAGE>
                                                                   EXHIBIT 10.39

           FIFTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT
                          [Revolving Credit Facility]

          THIS FIFTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT
[Revolving Credit Facility] (this "Amendment") dated as of the 31st day of
January, 2002, by and among PLAINS MARKETING, L.P. ("US Borrower"), ALL AMERICAN
PIPELINE, L.P. and PLAINS ALL AMERICAN PIPELINE, L.P., as guarantors, FLEET
NATIONAL BANK, as Administrative Agent, THE TORONTO-DOMINION BANK, as Canadian
Agent, PMC (NOVA SCOTIA) COMPANY ("Term Borrower"), PLAINS MARKETING CANADA,
L.P. ("Canadian Revolver Borrower"), and the Lenders party hereto.

                              W I T N E S S E T H:

          WHEREAS, US Borrower, All American, Plains MLP, Administrative Agent,
Canadian Agent, Term Borrower, Canadian Revolver Borrower and Lenders entered
into that certain Amended and Restated Credit Agreement [Revolving Credit
Facility] dated as of May 4, 2001 (as amended, supplemented, or restated to the
date hereof, the "Original Agreement") for the purposes and consideration
therein expressed, pursuant to which Lenders became obligated to make and made
loans to US Borrower, Term Borrower and Canadian Revolver Borrower as therein
provided; and

          WHEREAS, US Borrower, All American, Plains MLP, Administrative Agent,
Canadian Agent, Term Borrower, Canadian Revolver Borrower and Lenders desire to
amend the Original Agreement for the purposes described herein;

          NOW, THEREFORE, in consideration of the premises and the mutual
covenants and agreements contained herein and in the Original Agreement, in
consideration of the loans that may hereafter be made by Lenders to US Borrower,
Term Borrower and Canadian Revolver Borrower, and for other good and valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, the
parties hereto do hereby agree as follows:

                    ARTICLE I. -- Definitions and References
                                  --------------------------

          (S) 1.1.  Terms Defined in the Original Agreement.  Unless the context
                    ---------------------------------------
otherwise requires or unless otherwise expressly defined herein, the terms
defined in the Original Agreement shall have the same meanings whenever used in
this Amendment.

          (S) 1.2.  Other Defined Terms.  Unless the context otherwise requires,
                    -------------------
the following terms when used in this Amendment shall have the meanings assigned
to them in this (S) 1.2.

                    "Amendment" means this Fifth Amendment to Amended and
                     ---------
          Restated Credit Agreement [Revolving Credit Facility].

                    "Amendment Documents" means this Amendment.
                     -------------------

                    "Credit Agreement" means the Original Agreement as amended
                     ----------------
          hereby.

                                       1
<PAGE>

                           ARTICLE II. -- Amendments
                                          ----------

          (S) 2.1.  Definitions.  The definition of "Consolidated Net Worth" set
                    -----------
forth in Section 1.1 of the Original Agreement is hereby amended in its entirety
to read as follows:

                    "Consolidated Net Worth" means the remainder of all
                     ----------------------
          Consolidated assets, as determined in accordance with GAAP, of Plains
          MLP and its Subsidiaries minus the sum of (i) Plains MLP's
          Consolidated liabilities, as determined in accordance with GAAP, and
          (ii) the book value of any equity interests in any of Plains MLP's
          Subsidiaries which equity interests are owned by a Person other than
          Plains MLP or a Wholly Owned Subsidiary of Plains MLP. The effect of
          any increase or decrease of net worth in any period as a result of
          items of income or loss not reflected in the determination of net
          income but reflected in the determination of comprehensive income (to
          the extent provided under GAAP as in effect on the date hereof) shall
          be excluded in determining Consolidated Net Worth.

          The definition of "Permitted Acquisitions" set forth in Section 1.1 of
the Original Agreement is hereby amended in its entirety to read as follows:

                    "Permitted Acquisitions" means (A) the acquisition of the
                     ----------------------
          capital stock or other equity interest in a Person whose business,
          assets and operations consist of Petroleum Products and/or gas
          marketing, gathering, transportation, storage, terminaling and
          pipeline operation; provided, if a Restricted Person acquires less
                              --------
          than all of the capital stock or other equity interest acquired, such
          business, assets and operations shall consist of transportation,
          storage, terminaling and/or pipeline operations and associated
          gathering assets, or (B) the acquisition of all or a portion of a line
          of business or the business, assets or operations of a Person (whether
          in a single transaction or a series of related transactions)
          consisting of Petroleum Products and/or gas marketing, gathering,
          transportation, storage, terminaling and pipeline operation; provided,
                                                                       --------
          if a Restricted Person acquires less than all of the ownership
          interest of the business, assets or operations acquired, such
          business, assets and operations shall consist of transportation,
          storage, terminaling and/or pipeline operations and associated
          gathering assets; provided, further, in each case under clauses (A)
                            --------  -------
          and (B) above (i) prior to and after giving effect to such acquisition
          no Default or Event of Default shall have occurred and be continuing;
          and (ii) all representations and warranties shall be true and correct
          as if restated immediately following the consummation of such
          acquisition, except to the extent that any such representation or
          warranty was made as of a specific date or updated, modified or
          supplemented as of a subsequent date with the consent of Majority
          Lenders.

          The definition of "Permitted Investments" set forth in Section 1.1 of
the Original Agreement is hereby amended in its entirety to read as follows:

          "Permitted Investments" means:
           ---------------------

                    (a) Cash Equivalents,

                                       2
<PAGE>

          (b) Investments described in the Disclosure Schedule,

          (c) Investments by Plains MLP or any of its Subsidiaries in (1) any
     Wholly Owned Subsidiary of Plains MLP which is (or substantially
     contemporaneously with such Investment will become) a Borrower or a
     Guarantor, or (2) any business, asset or operation which is (or
     contemporaneously with such Investment becomes) wholly-owned by Plains MLP
     or any Wholly Owned Subsidiary of Plains MLP which is (or substantially
     contemporaneously with such Investment will become) a Borrower or a
     Guarantor,

          (d) Investments in publicly traded units of master limited
     partnerships whose dividends are "qualifying income" as such term is
     defined in Section 7704 of the Code (provided, the amount of any such
                                          --------
     Investments under this clause (d) minus any amounts received on such
                                       -----
     Investments (excluding dividends thereon) shall not at any time exceed the
     Dollar Equivalent of $5,000,000),

          (e) Permitted Acquisitions,

          (f) Investments by Plains MLP or any of its Subsidiaries in (i) any
     Person owning transportation, terminaling, storage and/or pipeline assets
     and associated gathering assets in which Plains MLP or any Wholly Owned
     Subsidiary of Plains MLP owns, directly or indirectly, less than all of the
     capital stock or other equity interest, or (ii) transportation,
     terminaling, storage and/or pipeline assets and associated gathering assets
     in which Plains MLP or any Wholly Owned Subsidiary of Plains MLP owns,
     directly or indirectly, less than all of the ownership interest therein,
     such Investments under clauses (i) and (ii) above in an aggregate amount
     not to exceed at any one time outstanding (A) the Dollar Equivalent of
     $35,000,000 minus (B) any outstanding Indebtedness under Section
                 -----
     7.1(f)(ii),

          (g) subject to Section 7.17(d), Investments directly or indirectly by
     Restricted Persons in Unrestricted Subsidiaries (i) consisting of Qualified
     Equity Proceeds, and (ii) Investments other than Qualified Equity Proceeds
     in an aggregate amount not to exceed, at any one time outstanding, the
     Dollar Equivalent of $100,000,000; for calculation purposes hereof: (1) any
     return on investment from any Unrestricted Subsidiary shall reduce the
     aggregate outstanding Investments subject to the limitation set forth in
     clause (ii) by an amount equal to the Non-Equity Investment to Total
     Investment Ratio times such investment return (e.g., if an Unrestricted
                      -----
     Subsidiary is capitalized with $100,000,000, $40,000,000 of which is
     Qualified Equity Proceeds and $60,000,000 of which is subject to the
     limitation set forth in clause (ii), and $10,000,000 is returned by such
     Unrestricted Subsidiary, the $60,000,000 subject to clause (ii) would be
     reduced by 6/10ths or $6,000,000 of such return); (2) in the event any
     Unrestricted Subsidiary is designated a Restricted Person pursuant to
     Section 7.17, executes and delivers Security Documents pursuant to Section
     6.14 and becomes a Guarantor pursuant to Section 6.17, the aggregate
     outstanding Investments subject to the limitation set forth in clause (ii)
     shall be reduced by the lesser of (i) Investments in such redesignated
     Subsidiary not constituting Qualified Equity Proceeds and (ii) the Non-
     Equity Investment to Total

                                       3
<PAGE>

     Investment Ratio times the fair market value of such redesignated
     Subsidiary as of the date of such designation as a Restricted Person, as
     reasonably determined by US Borrower; as used herein, "Qualified Equity
                                                            ----------------
     Proceeds" means proceeds of private or public offerings of equity
     --------
     securities by Restricted Persons after January 31, 2002 that within three
     months after the receipt thereof are (1) contributed as capital to one or
     more specified Unrestricted Subsidiaries, or (2) expressly designated as
     funds to be contributed as capital to one or more specified Unrestricted
     Subsidiaries, and are contributed pursuant to such designation within six
     months after such designation, and "Non-Equity Investment to Total
                                         ------------------------------
     Investment Ratio" means with respect to any Unrestricted Subsidiary, the
     ----------------
     ratio of (I) Investments in such Unrestricted Subsidiary not constituting
     Qualified Equity Proceeds to (II) all Investments in such Unrestricted
     Subsidiary, and

          (h) other Investments, excluding Investments in Unrestricted
     Subsidiaries, such other Investments not to exceed in the aggregate in
     respect of all Restricted Persons the Dollar Equivalent of $10,000,000.

     The definition of "Restricted Person" set forth in Section 1.1 of the
Original Agreement is hereby amended in its entirety to read as follows:

          "Restricted Person" means any of Plains MLP and each Subsidiary of
           -----------------
     Plains MLP, including but not limited to US Borrower, All American, Term
     Borrower, Canadian Revolver Borrower and each Subsidiary of US Borrower,
     All American, Term Borrower, and Canadian Revolver Borrower, but excluding,
     for the avoidance of doubt, Unrestricted Subsidiaries.

          The following definition of "Restriction Exception" is hereby added to
Section 1.1 of the Original Agreement in appropriate alphabetical order:

          "Restriction Exception" means (i) any instrument governing
           ---------------------
     Indebtedness or equity interests, or any other agreement relating to any
     property or assets, of a Person whose capital stock or other equity
     interests are partially acquired by a Restricted Person pursuant to a
     Permitted Acquisition, as such instrument or agreement is in effect at the
     time of such acquisition (except with respect to Indebtedness incurred in
     connection with, or in contemplation of, such acquisition), which is not
     applicable to any Restricted Person, or the property or assets of any
     Restricted Person, other than the partially-acquired Person, or the
     property or assets of such partially-acquired Person or such partially-
     acquired Person's Subsidiaries; provided that in the case of Indebtedness,
                                     --------
     such Indebtedness is permitted hereunder, or (ii) provisions with respect
     to the disposition or distribution of assets in joint venture agreements or
     other similar agreements entered into in the ordinary course of business.

     The definition of "Subsidiary" set forth in Section 1.1 of the Original
Agreement is hereby amended in its entirety to read as follows:

          "Subsidiary" means, with respect to any Person, any corporation,
           ----------
     association, partnership, limited liability company, joint venture, or
     other business or corporate entity,

                                       4
<PAGE>

     enterprise or organization which is directly or indirectly (through one or
     more intermediaries) controlled or owned more than fifty percent by such
     Person; provided, however, that no Unrestricted Subsidiary shall be deemed
             --------  -------
     a "Subsidiary" of Plains MLP or any Subsidiary of Plains MLP for purposes
     of any Loan Document except as provided in Section 7.17.

     The following definition of "Unrestricted Subsidiary" is hereby added to
Section 1.1 of the Original Agreement in appropriate alphabetical order:

               "Unrestricted Subsidiary" shall have the meaning given it in
                -----------------------
Section 7.17.

     (S) 2.2.  Agreement to Deliver Security Documents.   Section 6.14 of the
               ---------------------------------------
Original Agreement is hereby amended in its entirety to read as follows:

               Section 6.14.  Agreement to Deliver Security Documents.
                              ---------------------------------------
     Restricted Persons will deliver, and will cause each Person, other than
     Unrestricted Subsidiaries, in which it owns any capital stock or other
     equity interest (other than interests described in clause (d) of the
     definition of "Permitted Investments"), to deliver, to further secure the
     Obligations whenever requested by Administrative Agent in its sole and
     absolute discretion, deeds of trust, mortgages, chattel mortgages, security
     agreements, financing statements and other Security Documents in form and
     substance satisfactory to Administrative Agent for the purpose of granting,
     confirming, and perfecting first and prior liens or security interests in
     any real or personal property now owned or hereafter acquired by any
     Restricted Person; provided, with respect to any such property for which
                        --------
     the consent or approval of third parties is required for the delivery of
     such Security Documents, Restricted Persons shall not be required to
     deliver, or to cause such Person to deliver, such Security Documents with
     respect to such property, but shall use their commercially reasonable best
     efforts, as determined by Administrative Agent, to deliver, or to cause
     such Person to deliver, such Security Documents with respect to such
     property.  Without limiting the foregoing, each Restricted Person shall be
     required to grant a Lien in favor of Administrative Agent for the benefit
     of Lenders encumbering such Restricted Person's ownership interest in any
     Unrestricted Subsidiary; provided, no Security Document granting any such
                              --------
     Lien on such ownership interest in such Unrestricted Subsidiary shall
     restrict or limit the ownership or operation of such Unrestricted
     Subsidiary except as otherwise restricted or limited herein.

     (S) 2.3.  Guaranties of Subsidiaries.  The first sentence of Section 6.17
               --------------------------
of the Original Agreement is hereby amended in its entirety to read as follows:

     Each Subsidiary of Plains MLP, and any other Person, other than
     Unrestricted Subsidiaries, in which any Subsidiary of Plains MLP owns any
     capital stock or other equity interest (other than interests described in
     clause (d) of the definition of "Permitted Investments"), now existing or
     created, acquired or coming into existence after the date hereof shall,
     promptly upon request by Administrative Agent, execute and deliver to
     Administrative Agent an absolute and unconditional guaranty of the timely
     repayment of the Obligations and the due and punctual performance of the
     obligations of US Borrower, Term Borrower, and Canadian Revolver Borrower
     hereunder (in each case for which such

                                       5
<PAGE>

     Subsidiary is not a borrower, account party or similar primary and direct
     obligor), which guaranty shall be satisfactory to Administrative Agent in
     form and substance; provided, with respect to any such Subsidiary or other
                         --------
     Person that is not a Wholly Owned Subsidiary of Plains MLP, for which
     consent or approval of third parties is required for the delivery of such
     guaranty, such Subsidiary or such other Person shall not be required to
     deliver such guaranty, but shall use its commercially reasonable best
     efforts, as determined by Administrative Agent, to deliver such guaranty.
     Notwithstanding any provision contained herein, in no event shall any
     Unrestricted Subsidiary be required to execute and deliver any guaranty
     for, or in respect of, the Obligations, or any part thereof.

     (S) 2.4.  Limitation on Indebtedness.  Section 7.1(f) of the Original
               --------------------------
Agreement is hereby amended in its entirety to read as follows:

               (f) guaranties by Plains MLP, any Borrower or any Guarantor of
     trade payables incurred and paid in the ordinary course of business on
     ordinary trade terms by (i) any Restricted Person, or (ii) any other Person
     in which Plains MLP or any Wholly Owned Subsidiary of Plains MLP owns less
     than all of such Person's capital stock or other equity interest; provided,
                                                                       --------
     that the outstanding trade payables amount guaranteed at any time under
     this clause (ii) shall not exceed (A) $50,000,000 minus (B) any outstanding
                                                       -----
     Investments under clause (f) of the definition of Permitted Investments.

     (S) 2.5.  Limitation on Liens.  The reference to "Section 7.1(g)" set
               -------------------
forth in Section 7.2(i) of the Original Agreement is hereby amended to refer
instead to "Section 7.1(h)".

     (S) 2.6.  Limitations on Mergers; Issuances of Securities. The second,
               -----------------------------------------------
third and fourth sentences of Section 7.4 are hereby amended in their entirety
to read as follows:

     Any Person, other than US Borrower, Term Borrower, or Canadian Revolver
     Borrower, that is a Subsidiary of a Restricted Person may, however, be
     merged into or consolidated with (i) another Subsidiary of such Restricted
     Person, so long as (A) neither is a Guarantor, or (B) a Guarantor is the
     surviving business entity, (ii) such Restricted Person, so long as such
     Restricted Person is the surviving business entity, or (iii) any other
     Person pursuant or incidental to, or in connection with, any
     contemporaneous or substantially contemporaneous Permitted Acquisition,
     provided that such merging or consolidating Subsidiary (1) is not a
     --------
     Borrower, Guarantor or a Wholly Owned Subsidiary of Plains MLP, other than
     a Wholly Owned Subsidiary that was formed, acquired or created solely for
     purposes of such acquisition or otherwise conducted no operations and owned
     no assets, other than of an inconsequential amount and (2) does not own any
     Collateral.  Plains MLP will not issue any securities other than (i)
     limited partnership interests and any options or warrants giving the
     holders thereof only the right to acquire such interests, (ii) general
     partnership interests to General Partner, and (iii) debt securities
     permitted by Section 7.1(g).  No Subsidiary of Plains MLP will issue any
     additional shares of its capital stock, partnership interests or other
     securities or any options, warrants or other rights to acquire such
     additional shares, partnership interests or other securities, except a
     Subsidiary of a Restricted Person may issue additional shares, partnership
     interests or other securities (i) to Persons so long as such Restricted
     Person's and Plains MLP's

                                       6
<PAGE>

     aggregate ownership in such issuing Subsidiary is not diminished after
     giving effect thereto, or (ii) to any other Person pursuant or incidental
     to, or in connection with, any contemporaneous or substantially
     contemporaneous Permitted Acquisition, provided that such issuing
                                            --------
     Subsidiary (1) is not a Borrower, Guarantor or a Wholly Owned Subsidiary of
     Plains MLP, other than a Wholly Owned Subsidiary that was formed, acquired
     or created solely for purposes of such acquisition or otherwise conducted
     no operations and owned no assets, other than of an inconsequential amount
     and (2) does not own any Collateral.

     The fifth sentence of Section 7.4 is hereby deleted in its entirety.

     (S) 2.7.  Limitation on Sales of Property. Section 7.5 of the Original
               -------------------------------
Agreement is hereby amended by deleting "and" at the end of clause (c), adding
an amended clause (d) as follows:

               (d) in exchange for other property; provided that (i) such
                                                   --------
     exchange is for fair consideration, (ii) the property to be acquired in
     such exchange constitutes a Permitted Acquisition, (iii) the fair market
     value of such property being exchanged is not in the aggregate in excess of
     the Dollar Equivalent of $25,000,000 in any Fiscal Year, as reasonably
     determined by US Borrower (any such determination in excess of $10,000,000
     being determined in good faith by certified resolution of the board of
     directors of the corporate general partner of US Borrower and subject to,
     at Administrative Agent's reasonable request, confirmation by appraisal),
     and (iv) such exchange will not materially impair or diminish the value of
     the Collateral or any Restricted Person's financial condition, business or
     operations; and

and redesignating existing clause "(d)" as clause "(e)".

     The first sentence following such new clause (d) and redesignated clause
(e) of Section 7.5 is hereby amended in its entirety to read as follows:

     No Restricted Person will sell, transfer or otherwise dispose of capital
     stock of or interest in any of its Subsidiaries except (i) to Plains MLP or
     a Wholly Owned Subsidiary of Plains MLP or (ii) to any other Person
     pursuant or incidental to, or in connection with, any contemporaneous or
     substantially contemporaneous Permitted Acquisition, provided that such
                                                          --------
     Subsidiary whose capital stock or interests are being transferred (1) is
     not a Borrower, Guarantor or a Wholly Owned Subsidiary of Plains MLP, other
     than a Wholly Owned Subsidiary that was formed, acquired or created solely
     for purposes of such acquisition or otherwise conducted no operations and
     owned no assets, other than of an inconsequential amount and (2) does not
     own any Collateral; provided, in the event any limited partner interests
                         --------
     issued by Canadian Revolver Borrower to CanPet Energy Group (USA), Inc. or
     CanPet Energy Group Inc. pursuant to Section 7.4 are exchanged for units
     issued by Plains MLP, Lenders hereby consent to the contribution by Plains
     MLP to US Borrower of any and all such partnership interests.

     The reference to "clause (a) or (c)" in the last sentence of Section 7.5 is
hereby amended to refer instead to "clauses (a), (c) or (d)".

                                       7
<PAGE>

     (S) 2.8.  Limitation on Dividends and Redemptions. The first sentence of
               ---------------------------------------
Section 7.6 of the Original Agreement is hereby amended in its entirety to read
as follows :

               Section 7.6  Limitation on Dividends and Redemptions. No
                            ---------------------------------------
     Restricted Person will declare or pay any dividends on, or make any other
     distribution in respect of, any class of its capital stock or any
     partnership, limited liability company or other interest in it, nor will
     any Restricted Person directly or indirectly purchase, redeem, acquire or
     retire (or make any capital contribution to purchase, redeem, acquire or
     retire) any shares of the capital stock of or partnership or limited
     liability company interests in any Restricted Person (whether such
     interests are now or hereafter issued, outstanding or created), or cause or
     permit any reduction or retirement of the capital stock of any Restricted
     Person, while any Loan or any US Commitment or any Canadian Commitment is
     outstanding.

     (S) 2.9.  Prohibited Contracts.  The reference to "as described in the
               --------------------
Disclosure Schedule" set forth in the first sentence of Section 7.10 of the
Original Agreement is hereby amended to refer instead to "as described in the
Disclosure Schedule or pursuant to a Restriction Exception, the substance of
which, in detail satisfactory to Administrative Agent, is promptly reported to
Administrative Agent".

     (S) 2.10. Debt Coverage Ratio. Section 7.12 of the Original Agreement is
               -------------------
hereby amended in its entirety to read as follows:

     Section 7.12  Debt Coverage Ratio.  (a) At the end of any Fiscal
                   -------------------
Quarter, (b) on any date on which General Partner declares a distribution
permitted under Section 7.6 and (c) on the date of any Permitted Acquisition,
both immediately prior to and after giving effect to the consummation thereof,
the Debt Coverage Ratio will not be greater than 4.00 to 1.0.  As used herein,
"Debt Coverage Ratio" means the ratio of (a) Consolidated Funded Indebtedness to
--------------------
(b) Consolidated EBITDA for the four Fiscal Quarter period (or other period
specified below) most recently ended prior to the date of determination for
which financial statements contemplated by Section 6.2(a) or (b) are available
to Borrower; provided, for purposes of this Section 7.12, if, since the
             --------
beginning of the four Fiscal Quarter period ending on the date for which
Consolidated EBITDA is determined, any Restricted Person shall have made any
asset disposition or acquisition, shall have consolidated or merged with or into
any Person (other than another Restricted Person), or shall have made any
disposition or acquisition of a Restricted Person or disposition or acquisition
of any partial ownership interest in any other Person, Consolidated EBITDA shall
be calculated giving pro forma effect thereto as if the disposition,
acquisition, consolidation or merger had occurred on the first day of such
period; provided, with respect to any Person not constituting a Subsidiary of
        --------
Plains MLP, such pro forma calculation of Consolidated EBITDA, with respect to
any such Person, shall be limited to not more than 75% of (i) such Restricted
Person's ownership interest in such Person times (ii) the difference of such
                                           -----
Person's (A) Consolidated EBITDA minus (B) Interest Expense and capital
                                 -----
expenditures.  Such pro forma effect shall include adjustments with respect to
management fees previously distributed with respect to the assets subject to the
CanPet Acquisition and the acquisition of the remaining 50% of the Manito
Pipeline in mid calendar year 2000, and shall otherwise be determined (i) in
good faith by the chief financial officer of Borrower, and (ii) without giving

                                       8
<PAGE>

effect to any anticipated or proposed change in operations, revenues, expenses
or other items included in the computation of Consolidated EBITDA, except with
the consent of Majority Lenders.

     (S) 2.11.  Unrestricted Subsidiaries.  Article VII of the Original
                -------------------------
Agreement is hereby amended by adding a new Section 7.17 at the end thereof, to
read as follows:

               Section 7.17  Unrestricted Subsidiaries.  Plains MLP or any
                             -------------------------
     Wholly Owned Subsidiary of Plains MLP may designate one or more direct
     Subsidiaries that are not Borrowers or Guarantors (each such Subsidiary,
     and each of its Subsidiaries, each an "Unrestricted Subsidiary"), which
                                            ------------------------
     Unrestricted Subsidiaries shall be subject to the following:

     (a)       No Unrestricted Subsidiary shall be deemed to be a "Restricted
               Person" or a "Subsidiary" of Plains MLP for purposes of this
               Agreement or any other Loan Document, and no Unrestricted
               Subsidiary shall be subject to or included within the scope of
               any provision herein or in any other Loan Document, including
               without limitation any representation, warranty, covenant or
               Event of Default herein or in any other Loan Document, except as
               set forth in this Section 7.17.

     (b)       No Restricted Person shall guarantee or otherwise become liable
               in respect of any Liability or other obligation of, grant any
               Lien on any of its property to secure any Liability or other
               obligation of, make any Investment in (except as described in
               clause (g) of the definition of Permitted Investments), or
               provide any other form of credit support to, any Unrestricted
               Subsidiary, and no Restricted Person shall enter into any
               contract or agreement with any Unrestricted Subsidiary, except in
               the course of ordinary business on terms no less favorable to
               such Restricted Person, as applicable, than could be obtained in
               a comparable arm's length transaction with a non-Affiliate of
               such Restricted Person.

     (c)       Borrowers shall at all times maintain, as between Restricted
               Persons and Unrestricted Subsidiaries, the separate existence of
               each Unrestricted Subsidiary.

     (d)       No Restricted Person shall make any Investment in any
               Unrestricted Subsidiary pursuant to clause(g) of the definition
               of "Permitted Investment" except in connection with the
               capitalization of an Unrestricted Subsidiary to consummate a
               proposed acquisition, disclosed to Administrative Agent in
               writing, of (1) the acquisition of the capital stock or other
               equity interest in a Person whose business, assets and operations
               consist of Petroleum Products and/or gas marketing, gathering,
               transportation, storage, terminaling and pipeline operation;
               provided, if a Restricted Person acquires less than all of the
               --------
               capital stock or other equity interest acquired, such business,
               assets and operations shall consist of transportation, storage,
               terminaling and/or pipeline operations and associated gathering
               assets, or (2) the acquisition of all or a portion of a line of
               business or the business, assets or operations of a Person
               (whether in a single transaction or a series of related
               transactions) consisting of Petroleum Products and/or gas
               marketing, gathering, transportation, storage, terminaling and
               pipeline operation;
                                       9
<PAGE>

               provided, if a Restricted Person acquires less than all of the
               --------
               ownership interest of the business, assets or operations
               acquired, such business, assets and operations shall consist of
               transportation, storage, terminaling and/or pipeline operations
               and associated gathering assets; provided, further, the aggregate
                                                --------  -------
               amount of any such Permitted Investments in such Unrestricted
               Subsidiary in excess of the purchase price and associated
               acquisition costs relating to such acquisition shall, promptly
               following the consummation of such acquisition, be distributed
               back to such investing Restricted Person. In the event such
               Unrestricted Subsidiary shall fail to timely consummate such
               specified acquisition or such specified acquisition shall
               otherwise be abandoned, such Unrestricted Subsidiary shall be
               deemed to be a "Subsidiary" of Plains MLP for purposes of this
               Agreement and shall be subject to the terms and conditions
               hereof.

     (e)       Restricted Persons shall notify each Lender Party, not later than
               five (5) Business Days after any executive officer of Restricted
               Persons has knowledge of, under any Environmental Law, any claim
               of the Dollar Equivalent of $1,000,000 or more, any notice of
               potential liability which might be reasonably likely to exceed
               such amount, or any other material adverse claim thereunder
               asserted against any Unrestricted Subsidiary or with respect to
               any Unrestricted Subsidiary's properties, stating that such
               notice is being given pursuant to this Section 7.17.

     The board of directors of the corporate general partner of the US Borrower
     may designate any Unrestricted Subsidiary to become a Restricted Person if
     a Default or Event of Default is not continuing, such designation would not
     result in a Default or an Event of Default, and immediately thereafter such
     Subsidiary has no outstanding Indebtedness.  Immediately thereafter, US
     Borrower shall promptly notify the Administrative Agent of such designation
     and provide to it an officer's certificate that such designation was made
     in compliance with this Section 7.17.

                  ARTICLE III. -- Conditions of Effectiveness
                                  ---------------------------

     (S) 3.1.  Effective Date.  This Amendment shall become effective as of the
               --------------
date first written above, when and only when

               (i)  Administrative Agent shall have received, at Administrative
     Agent's office (A) a counterpart of this Amendment executed and delivered
     by US Borrower, Term Borrower, Canadian Revolver Borrower, Plains MLP, All
     American and Majority Lenders, and consented to by each Guarantor, (B) a
     contemporaneous amendment to the Marketing Credit Agreement, amending
     various provisions therein consistent with the amendments set forth herein,
     in form and substance acceptable to Administrative Agent, executed and
     delivered by such Persons so as to make such amendment effective;

               (ii) (A) In consideration hereof, US Borrower shall have paid to
     Administrative Agent for the account of each Lender executing and
     delivering this Amendment an amendment fee in immediately available funds
     equal to one-twentieth of one percent (0.05%) of each such Lender's
     Commitment, and (B) US Borrower shall have paid all

                                       10
<PAGE>

     other fees required to be paid to Administrative Agent or any Lender
     pursuant to any Loan Documents, including fees and expenses of Thompson &
     Knight LLP, counsel to Administrative Agent; and

         (iii)  Administrative Agent shall have additionally received all of the
     following documents, each document (unless otherwise indicated) being dated
     the date of receipt thereof by Administrative Agent, duly authorized,
     executed and delivered, and in form and substance satisfactory to
     Administrative Agent:

                (A) Officer's Certificate. A certificate of a duly authorized
                    ---------------------
         officer of General Partner, to the effect that all of the
         representations and warranties set forth in Article IV hereof are true
         and correct at and as of the date thereof, and

                (B) Supporting Documents. Such supporting documents as
                    --------------------
         Administrative Agent may reasonably request.

                 ARTICLE IV. -- Representations and Warranties
                                ------------------------------

     (S) 4.1.  Representations and Warranties of Plains MLP and Borrowers. In
               ----------------------------------------------------------
order to induce Administrative Agent and Lenders to enter into this Amendment,
Plains MLP and Borrowers represent and warrant to Administrative Agent and each
Lender that:

               (a) The representations and warranties contained in Article V of
     the Original Agreement are true and correct at and as of the time of the
     effectiveness hereof, except to the extent that such representation and
     warranty was made as of a specific date.

               (b) Each Restricted Person is duly authorized to execute and
     deliver this Amendment and each other Amendment Document, to the extent a
     party thereto, and each Borrower is and will continue to be duly authorized
     to borrow and perform its obligations under the Credit Agreement. Each
     Restricted Person has duly taken all action necessary to authorize the
     execution and delivery of this Amendment and each other Amendment Document,
     to the extent a party thereto, and to authorize the performance of their
     respective obligations hereunder.

               (c) The execution and delivery by each Restricted Person of this
     Amendment and each other Amendment Document, to the extent a party thereto,
     the performance by each Restricted Person of its respective obligations
     hereunder and thereunder, and the consummation of the transactions
     contemplated hereby and thereby, do not and will not conflict with any
     provision of any Law or of the organizational documents of any Restricted
     Person, or of any material agreement, judgment, license, order or permit
     applicable to or binding upon any Restricted Person, or result in the
     creation of any Lien upon any assets or properties of any Restricted
     Person, except in favor of Administrative Agent or Canadian Agent for the
     benefit of Lenders and other Permitted Liens. Except for those which have
     been duly obtained, no consent, approval, authorization or order of any
     Tribunal or third party is required in connection with the execution and
     delivery by

                                       11
<PAGE>

     any Restricted Person of this Amendment or any other Amendment Document, or
     to consummate the transactions contemplated hereby and thereby.

               (d) When duly executed and delivered, each of this Amendment and
     each other Amendment Document, and each of the Loan Documents, as amended
     hereby and thereby, will be a legal and binding instrument and agreement of
     each Restricted Person to the extent a party thereto, enforceable in
     accordance with its terms, (subject, as to enforcement of remedies, to
     applicable bankruptcy, insolvency and similar laws applicable to creditors'
     rights generally).

                          ARTICLE V. -- Miscellaneous
                                        -------------

     (S) 5.1.  Ratification of Agreements. The Original Agreement, as hereby
               --------------------------
amended, is hereby ratified and confirmed in all respects. The Loan Documents
(including but not limited to each Guaranty), as they may be amended or affected
by this Amendment or any other Amendment Document, are hereby ratified and
confirmed in all respects by each Restricted Person to the extent a party
thereto. Any reference to the Credit Agreement in any Loan Document shall be
deemed to refer to this Amendment also. The execution, delivery and
effectiveness of this Amendment and the other Amendment Documents shall not,
except as expressly provided herein, operate as a waiver of any right, power or
remedy of Administrative Agent, Canadian Agent or any Lender under the Credit
Agreement or any other Loan Document nor constitute a waiver of any provision of
the Credit Agreement or any other Loan Document.

     (S) 5.2.  Ratification of Security Documents. Restricted Persons,
               ----------------------------------
Administrative Agent, and Lenders each acknowledge and agree that any and all
indebtedness, liabilities or obligations, arising under or in connection with
the LC Obligations or the Notes, are Obligations and are secured indebtedness
under, are guarantied by, and are secured by, each and every Security Document
to which any Restricted Person is a party. Each Restricted Person hereby re-
pledges, re-grants and re-assigns a security interest in and lien on every asset
of the such Restricted Person described as Collateral in any Security Document
and re-guarantees all Obligations under the Credit Agreement.

     (S) 5.3.  Ratification of Intercreditor Agreement. Each Lender hereby
               ---------------------------------------
acknowledges and confirms that all Obligations under the Credit Agreement, as
amended hereby, and the "Obligations" under the Marketing Credit Agreement, as
amended on the date hereof, shall be and shall remain subject to the terms and
entitled to the benefits of the Intercreditor Agreement.

     (S) 5.4.  Survival of Agreements. All representations, warranties,
               ----------------------
covenants and agreements of the Restricted Persons herein shall survive the
execution and delivery of this Amendment and the performance hereof, including
without limitation the making or granting of each Loan, and shall further
survive until all of the Obligations under the Credit Agreement are paid in
full. All statements and agreements contained in any certificate or instrument
delivered by any Restricted Person hereunder or under the Credit Agreement to
Administrative Agent, Canadian Agent or any Lender shall be deemed to constitute
representations and warranties by, or agreements and covenants of, such
Restricted Person under this Amendment and under the Credit Agreement.

                                       12
<PAGE>

     (S) 5.5.  Loan Documents. This Amendment and each other Amendment Document
               --------------
is a Loan Document, and all provisions in the Credit Agreement pertaining to
Loan Documents apply hereto.

     (S) 5.6.  GOVERNING LAW.  THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED
               -----------------------------------------------------------------
IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK AND ANY APPLICABLE LAWS OF
-------------------------------------------------------------------------------
THE UNITED STATES OF AMERICA IN ALL RESPECTS, INCLUDING CONSTRUCTION, VALIDITY
--------------------------------------------------------------------------
AND PERFORMANCE.
---------------

     (S) 5.7.  Counterparts. This Amendment may be separately executed in
               ------------
counterparts and by the different parties hereto in separate counterparts, each
of which when so executed shall be deemed to constitute one and the same
Amendment.

                                       13
<PAGE>

     IN WITNESS WHEREOF, this Amendment is executed as of the date first above
written.

US BORROWER:             PLAINS MARKETING, L.P.

                         By: Plains Marketing GP Inc., General Partner

                         By: /s/ Phil Kramer
                             ---------------------------------------------------
                                Phil Kramer, Exec. Vice President

GUARANTORS:              ALL AMERICAN PIPELINE, L.P.

                         By: Plains Marketing GP Inc., General Partner

                         By: /s/ Phil Kramer
                             --------------------------------------------------
                                Phil Kramer, Exec. Vice President

                         PLAINS ALL AMERICAN PIPELINE, L.P.

                         By: Plains AAP, L.P., General Partner

                         By: Plains All American LLC, General Partner

                         By: /s/ Phil Kramer
                             ---------------------------------------------------
                                Phil Kramer, Exec. Vice President

CANADIAN REVOLVER
BORROWER:                PLAINS MARKETING CANADA, L.P.,

                         By: PMC (Nova Scotia) Company, General Partner

                         By: /s/ Phil Kramer
                             ---------------------------------------------------
                                Phil Kramer, Exec. Vice Pres.

TERM BORROWER:           PMC (NOVA SCOTIA) COMPANY

                         By: /s/ Phil Kramer
                             ---------------------------------------------------
                                Phil Kramer, Exec. Vice Pres.

                                       14
<PAGE>

LENDER PARTIES:               FLEET NATIONAL BANK,
                              Administrative Agent, LC Issuer and Lender

                              By: /s/ Terrence Ronan
                                  ----------------------------------------------
                                     Terrence Ronan, Managing Director

                              FIRST UNION NATIONAL BANK, Lender

                              By: /s/ Robert R. Wetteroff
                                  ----------------------------------------------
                                     Robert R. Wetteroff, Sr. Vice Pres.

                              BANK OF AMERICA, N.A., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              BANK ONE, NA, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              FORTIS CAPITAL CORP., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              By: ______________________________________________
                                     Name:
                                     Title:

                              U.S. BANK NATIONAL ASSOCIATION, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              BANK OF SCOTLAND, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                                       15
<PAGE>

                              WELLS FARGO BANK (TEXAS),
                              NATIONAL ASSOCIATION, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              THE BANK OF NOVA SCOTIA, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              CREDIT AGRICOLE INDOSUEZ, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              By: ______________________________________________
                                     Name:
                                     Title:

                              TORONTO DOMINION (TEXAS), INC., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              SOUTHWEST BANK OF TEXAS, N.A., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              UNION BANK OF CALIFORNIA, N.A., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                                       16
<PAGE>

                              COMERICA BANK-TEXAS, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              BNP PARIBAS, Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                              By: ______________________________________________
                                     Name:
                                     Title:

                              HELLER FINANCIAL, INC., Lender

                              By: ______________________________________________
                                     Name:
                                     Title:

                                       17
<PAGE>

                              THE TORONTO-DOMINION BANK,
                              Canadian Administration Agent

                              By:_____________________________________________
                                   Name:
                                   Title:

                              THE TORONTO-DOMINION BANK,
                              Canadian Revolver Lender

                              By:_____________________________________________
                                   Name:
                                   Title:

                              BNP PARIBAS (CANADA), Canadian Revolver Lender

                              By:_____________________________________________
                                   Name:
                                   Title:

                              By:_____________________________________________
                                   Name:
                                   Title:

                              HELLER FINANCIAL CANADA, LTD.,
                              Canadian Revolver Lender

                              By:_____________________________________________
                                   Name:
                                   Title:

                                       18
<PAGE>

                              PILGRIM PRIME RATE TRUST
                              PILGRIM SENIOR INCOME FUND
                              ML CLO XX PILGRIM AMERICA (CAYMAN) LTD.
                              ML CLO XII PILGRIM AMERICA (CAYMAN) LTD.
                              PILGRIM CLO 1999 - 1 LTD.
                              SEQUILS - PILGRIM I, LTD.
                              PILGRIM AMERICA HIGH INCOME
                              INVESTMENTS LTD., each a Lender

                              By:  ING Pilgrim Investments, LLC,
                                    as its investment manager

                              By:_____________________________________________
                                   Name:
                                   Title:

                              MORGAN STANLEY PRIME INCOME TRUST, Lender

                              By:_____________________________________________
                                   Name:
                                   Title:

                              FLAGSHIP CLO 2001-1
                              FLAGSHIP CLO II, each a Lender

                              By:  Flagship Capital Management, Inc.

                              By:_____________________________________________
                                   Title:

                              ALLSTATE LIFE INSURANCE COMPANY
                              AIMCO CDO SERIES 2000-A
                              AIMCO CLO SERIES 2001-A, each a Lender

                              By:_____________________________________________
                                   Name:

                              By:_____________________________________________
                                   Name:
                              Its Authorized Signatories

                                       19
<PAGE>

                              SWISS LIFE US RAINBOW LIMITED            THE ING
                              INCOME HOLDINGS FUND, LTD.
                              ARCHIMEDES FUNDING IV (CAYMAN), LTD.
                              NEMEAN CLO, LTD., each a Lender

                              By:  ING Capital Advisors LLC,
                                    as Investment Manager

                              By:_____________________________________________
                                   Title:

                              ARCHIMEDES FUNDING III, LTD.
                              SEQUILS-ING-I (HBDGM), LTD.
                              ORYX CLO, LTD., each a Lender

                              By:  ING Capital Advisors LLC,
                                   as Collateral Manager

                              By:_____________________________________________
                                   Title:

                              BALANCED HIGH YIELD FUND II, LTD., Lender

                              By:  ING Capital Advisors LLC,
                                   as Asset Manager

                              By:_____________________________________________
                                   Title:

                              FIDELITY ADVISOR SERIES II: FIDELITY ADVISOR
                              FLOATING RATE HIGH INCOME FUND, a Lender

                              By:_____________________________________________
                                   Title:

                                       20
<PAGE>

                         TRYON CLO LTD. 2000-I
                         ELC (CAYMAN) LTD. 1999-II
                         ELC (CAYMAN) LTD. 1999-III
                         ELC (CAYMAN) LTD. 2000-I
                         APEX (IDM) CDO I, LTD., each a Lender

                         By:____________________________________________________
                              Title:

                         MONUMENT CAPITAL LTD., Lender
                         By:  Alliance Capital Management, L.P.,
                              as Investment Manager

                         By:  Alliance Capital Management Corporation,
                              as General Partner

                         By:____________________________________________________
                              Name:
                              Title:

                         NEW ALLIANCE GLOBAL CDO LIMITED, Lender
                         By:  Alliance Capital Management, L.P., as Sub-advisor

                         By:  Alliance Capital Management Corporation,
                              as General Partner

                         By:____________________________________________________
                              Name:
                              Title:

                         SENIOR LOAN FUND
                         BLACKROCK SENIOR LOAN TRUST, each a Lender

                         By:____________________________________________________
                              Name:
                              Title:

                         CARLYLE HIGH YIELD PARTNERS II, LTD.
                         CARLYLE HIGH YIELD PARTNERS III, LTD.,
                         each a Lender

                         By:____________________________________________________
                              Name:
                              Title:

                                       21
<PAGE>

                         WINGED FOOT FUNDING TRUST
                         By:____________________________________________________
                              Name:
                              Title:

                         JUPITER FUNDING TRUST
                         By:____________________________________________________
                              Name:
                              Title:

                         OLYMPIC FUNDING TRUST, SERIES 1999-1
                         By:____________________________________________________
                              Name:
                              Title:

                         MUIRFIELD TRADING LLC, each a Lender
                         By:____________________________________________________
                              Name:
                              Title:

                         FIRST DOMINION FUNDING I
                         FIRST DOMINION FUNDING II, each a Lender

                         By:____________________________________________________
                              Name:
                              Title:

                         SEQUILS-CUMBERLAND I, LTD., Lender

                         By:  Deerfield Capital Management, L.L.C.
                              as its Collateral Manager

                         By:____________________________________________________
                              Name:
                              Title

                         EMERALD ORCHARD, LIMITED, Lender
                         By:____________________________________________________
                              Name:
                              Title:

                                       22
<PAGE>

                         HIGHLAND LOAN FUNDING V LTD., Lender

                         By:  Highland Capital Management, L.P.,
                              as Collateral Manager
                         By:____________________________________________________
                              Name:
                              Title:

                                       23
<PAGE>

                         AMARA I FINANCE, LTD.
                         AMARA 2 FINANCE, LTD.
                         OASIS COLLATERALIZED HIGH INCOME
                         PORTFOLIO-1, LTD., each a Lender

                         By:   INVESCO Senior Secured Management, Inc.,
                               as Subadviser

                         By:_____________________________________________
                               Name:
                               Title:

                         AERIES FINANCE II LTD., Lender

                         By:   INVESCO Senior Secured Management, Inc.
                               as Sub-Managing Agent

                         By:______________________________________________
                               Name:
                               Title:

                         AVALON CAPITAL LTD.
                         AVALON CAPITAL LTD. 2, each a Lender

                         By:   INVESCO Senior Secured Management, Inc.
                               as Portfolio Advisor

                         By:______________________________________________
                               Name:
                               Title:

                         CERES II FINANCE LTD., Lender

                         By:   INVESCO Senior Secured Management, Inc.,
                               as Sub-Managing Agent (Financial)

                         By:_____________________________________________
                               Name:
                               Title:

                                       24
<PAGE>

                         CHARTER VIEW PORTFOLIO, Lender

                         By:   INVESCO Senior Secured Management, Inc.,
                               as Investment Advisor

                         By:__________________________________________________
                               Name:
                               Title:

                         By:   INVESCO Senior Secured Management, Inc.,
                               as attorney in fact

                         By:__________________________________________________
                               Name:
                               Title:

                         SEQUILS-LIBERTY, LTD.

                         By:   INVESCO Senior Secured Management, Inc.,
                               as Collateral Manager

                         By:__________________________________________________
                               Name:
                               Title:

                         MASSACHUSETTS MUTUAL LIFE INSURANCE
                         COMPANY, Lender

                         By:   David L. Babson & Company Inc.,
                               as Investment Advisor

                         By:__________________________________________________
                               Name:
                               Title:

                         MAPLEWOOD (CAYMAN) LIMITED, Lender

                         By:   David L. Babson & Company Inc. under delegated
                               authority from Massachusetts Mutual Life
                               Insurance Company as Investment Manager

                         By:__________________________________________________
                               Name:
                               Title:

                                       25
<PAGE>

                         SAAR HOLDINGS CDO LIMITED
                         SIMSBURY CLO, LIMITED
                         SOMERS CDO, LIMITED, each a Lender

                         By:   David L. Babson & Company Inc. under delegated
                               authority from Massachusetts Mutual Life
                               Insurance Company as Collateral Manager

                         By:___________________________________________________
                               Name:
                               Title:

                         SUFFIELD CLO, LIMITED, Lender

                         By:   David L. Babson & Company Inc.,
                               as Collateral Manager

                         By:___________________________________________________
                               Name:
                               Title:

                         PERSEUS CDO I, LIMITED, Lender

                         By:   David L. Babson & Company Inc. under delegated
                               authority from Massachusetts Mutual Life
                               Insurance Company as Portfolio Manager

                         By:____________________________________________________
                               Name:
                               Title:

                         BILL & MELINDA GATES FOUNDATION, Lender

                         By:   David L. Babson & Company Inc.,
                               as Investment Adviser

                         By:____________________________________________________
                               Name:
                               Title:

                                       26
<PAGE>

                         OAK HILL CREDIT PARTNERS I, LIMITED, Lender

                         By:   Oak Hill CLO Management I, LLC,
                               as Investment Manager

                         By:__________________________________________
                               Name:
                               Title:

                         OCTAGON INVESTMENT PARTNERS II, LLC, Lender

                         By:   Octagon Credit Investors, LLC,
                               as sub-investment manager

                         By:____________________________________________
                               Name:
                               Title:

                         OCTAGON INVESTMENT PARTNERS III, LTD.,
                         Lender

                         By:   Octagon Credit Investors, LLC,
                               as Portfolio Manager

                         By:_____________________________________________
                               Name:
                               Title:

                         OCTAGON INVESTMENT PARTNERS IV, LTD.,
                         Lender

                         By:   Octagon Credit Investors, LLC,
                               as collateral manager

                         By:_____________________________________________
                               Name:
                               Title:

                                       27
<PAGE>

                         DELANO COMPANY
                         ROYALTON COMPANY
                         BEDFORD CDO, LIMITED
                         ADDISON CDO, LIMITED
                         JISSEKIKUN FUNDING, LTD.
                         BALBOA CDO I, LIMITED
                         SEQUILS-MAGNUM, LTD.
                         SAN JOAQUIN CDO I LIMITED, each a Lender

                         By:   Pacific Investment Management Company, LLC,
                               as its Investment Advisor

                         By:________________________________________________
                               Name:
                               Title:

                         CAPTIVA III FINANCE LTD.
                         CAPTIVA IV FINANCE LTD., each a Lender
                         as advised by Pacific Investment Management
                          Company LLC

                         By:________________________________________________
                               Name:
                               Title:

                         THE SUMITOMO TRUST & BANKING CO.,
                         LTD. NEW YORK BRANCH, Lender

                         By:________________________________________________
                               Name:
                               Title:

                         TCW SELECT LOAN FUND, LIMITED, Lender

                         By:  TCW Advisors, Inc., as its Collateral Manager

                         By:________________________________________________
                               Name:
                               Title:

                         By:________________________________________________
                               Name:
                               Title:

                                       28
<PAGE>

                         MOUNTAIN CAPITAL CLO I LTD.
                         MOUNTAIN CAPITAL CLO II LTD. each a Lender

                         By:  Mountain Capital Advisors,
                              as its Investment Manager

                         By:_______________________________________________
                               Name:
                               Title:

                                       29
<PAGE>

                              KZH ING-1 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH ING-2 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH ING-3 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH CNC LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH WATERSIDE LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH PONDVIEW LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                                       30
<PAGE>

                              KZH CRESCENT LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH CRESCENT-2 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH CRESCENT-3 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH HIGHLAND-2 LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              KZH PAMCO LLC, Lender

                              By:___________________________________
                                   Name:
                                   Title:

                              FRANKLIN CLO II, LIMITED

                              By:___________________________________
                                   Name:
                                   Title:

                                       31
<PAGE>

                             CONSENT AND AGREEMENT
                             ---------------------

     The undersigned hereby consents to the provisions of this Amendment and the
transactions contemplated herein and hereby (i) acknowledges and agrees that any
and all indebtedness, liabilities or obligations arising under or in connection
with the Notes are Obligations and are secured indebtedness under, and are
secured by, each and every Security Document to which it is a party, (ii) re-
pledges, re-grants and re-assigns a security interest in and lien on all of its
assets described as collateral in any Security Document, (iii) ratifies and
confirms its Guaranty dated May 4, 2001 made by it for the benefit of
Administrative Agent and Lenders, and (iv) expressly acknowledges and agrees
that the undersigned guarantees all indebtedness, liabilities and obligations
arising under or in connection with any and all Notes pursuant to the terms of
such Guaranty, and agrees that its obligations and covenants thereunder are
unimpaired hereby and shall remain in full force and effect.

                              PLAINS MARKETING CANADA LLC

                              By:  Plains Marketing, L.P., its sole member

                              By:  Plains Marketing GP Inc.,
                                   its general partner

                              By:____________________________________________
                                   Phil Kramer, Exec. Vice President

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