<PAGE>
 
                                                                   EXHIBIT 10(a)


                              THIRD AMENDMENT TO
                  THIRD AMENDED AND RESTATED CREDIT AGREEMENT


     THIS THIRD AMENDMENT TO THIRD AMENDED AND RESTATED CREDIT AGREEMENT (this
"Amendment") dated as of the 18th day of July, 1997, by and among PLAINS
RESOURCES INC., a Delaware corporation (the "Company"), ING (U.S.) CAPITAL
CORPORATION, f/k/a Internationale Nederlanden (U.S.) Capital Corporation, as
Agent ("Agent"), and the Lenders under the Original Agreement (as defined
herein).

                             W I T N E S S E T H:

     WHEREAS, the Company, Agent and Lenders entered into that certain Third
Amended and Restated Credit Agreement dated as of April 11, 1996, as amended by
that certain First Amendment to Third Amended and Restated Credit Agreement
dated December 16, 1996 and that certain Second Amendment to Third Amended and
Restated Credit Agreement dated March 7, 1997 (as amended, the "Original
Agreement") for the purposes and consideration therein expressed, pursuant to
which Lenders became obligated to make and made loans to the Company as therein
provided; and

     WHEREAS, the Company, 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 which may hereafter be made by Lenders to the Company, 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 Third Amendment to Third Amended and Restated
     Credit Agreement.

          "Amendment Documents" means this Amendment.

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

                                      -1-
<PAGE>
 
                           ARTICLE II. -- Amendments

     (S) 2.1  Definitions.  The definitions of "Senior Subordinated Indenture"
and "Senior Subordinated Notes" set forth in Section 1.01 of the Original
Agreement are hereby amended in their entirety to read as follows:

             "Senior Subordinated Indenture" shall mean (i) that certain
     Indenture dated as of March 15, 1996 among the Company, Subsidiary
     Guarantors and Texas Commerce Bank National Association, as Trustee, and
     (ii) that certain Indenture to be dated on or about July 21, 1997 among the
     Company, Subsidiary Guarantors and Texas Commerce Bank National
     Association, as Trustee, in each case as amended or modified from time to
     time in compliance with Section 8.23

              "Senior Subordinated Notes" shall mean (i) the 10 1/4% senior
     subordinated notes due 2006 in the aggregate principal amount of
     $150,000,000 issued by the Company pursuant to the Senior Subordinated
     Indenture dated as of March 15, 1996 and (ii) the 10 1/4% senior
     subordinated notes due 2006 in the aggregate principal amount of
     $50,000,000 issued by the Company pursuant to the Senior Subordinated
     Indenture to be dated on or about July 21, 1997.

     (S) 2.2  Subordinated Indebtedness.  Sections 8.14(b) and (c) of the
Original Agreement are hereby amended in their entirety to read as follows:

             (b) The Company may offer to purchase and redeem Senior
     Subordinated Notes in the amount and under the circumstances described in
     Section 4.12(iii)(c) of the Senior Subordinated Indenture dated as of March
     15, 1996 and Section 4.12(iv) of the Senior Subordinated Indenture to be
     dated on or about July 21, 1997, provided that: (i) the Company shall have
     given Agent and each Lender written notice of its intent to so purchase and
     redeem (collectively "redeem") the Senior Subordinated Notes at least 25
     days prior to the date (the "Net Proceeds Payment Date") that it will
     become obligated to so redeem such Senior Subordinated Notes pursuant to
     such Section 4.12(iii)(c) or Section 4.12(iv), as appropriate, such notice
     to specify the Net Proceeds Payment Date and, based upon the proceeds
     available for such redemption, the maximum amount of Senior Subordinated
     Notes that may be so redeemed, (ii) the Company shall have provided to
     Agent and each Lender such information as Agent shall have reasonably
     requested with regard to such redemption, (iii) no Default or Event of
     Default shall have occurred and be continuing at the time of any such
     redemption, and (iv) if elected by Majority Lenders, by written notice to
     the Company during the 25 day period after such notice is given, a new
     Borrowing Base shall have been determined by Majority Lenders in the manner
     specified by Section 2.08 hereof and the outstanding aggregate principal
     balance of the Notes shall not exceed such Adjusted Borrowing Base as so
     redetermined.

             (c) The Company may offer to purchase and redeem Senior
     Subordinated Notes in an amount of up to $60,000,000 under the
     circumstances described in Paragraph 5 thereof, provided that: (i) the
     Company shall have given Agent and each

                                      -2-
<PAGE>
 
     Lender written notice of its intent to so purchase or redeem (collectively
     "redeem") such Senior Subordinated Notes at least 25 days prior to the date
     (the "Net Proceeds of  a Public Offering Redemption Date") that it will
     become obligated to so redeem such Senior Subordinated Notes pursuant to
     Paragraph 5 thereof, such notice to specify the Net Proceeds of a Public
     Offering Redemption Date and, based upon the proceeds available for such
     redemption, the maximum amount of Senior Subordinated Notes that may be so
     redeemed, (ii) the Company shall have provided to Agent and each Lender
     such information as Agent shall have reasonably requested with regard to
     such redemption, (iii) no Default or Event of Default shall have occurred
     and be continuing at the time of any such redemption, and (iv) if elected
     by Majority Lenders, by written notice to the Company during the 25 day
     period after such notice is given, a new Borrowing Base shall have been
     determined by Majority Lenders in the manner specified by Section 2.08
     hereof and the outstanding aggregate principal balance of the Notes shall
     not exceed such Adjusted Borrowing Base as so redetermined.

     (S) 2.3  Waiver and Consent - Issuance of Senior Subordinated Notes.  The
Company proposes to issue its Senior Subordinated Notes due 2006 in the
aggregate principal amount of $50,000,000, as set forth in an Offering Circular
substantially in the form previously furnished to Agent and Lenders, which are
to be guaranteed by Subsidiary Guarantors.  The Company intends to use the
proceeds of such Senior Subordinated Notes to prepay the Loans.  Lenders hereby
consent to, and waive any Default or Event of Default occurring as a result of,
the issuance of such new Senior Subordinated Notes and the guarantee of such new
Senior Subordinated Notes by Subsidiary Guarantors; provided the subordination
provisions of the Senior Subordinated Indenture to be dated on or about July 21,
1997 pursuant to which such new Senior Subordinated Notes are to be issued and
the guaranties of such new Senior Subordinated Notes by Subsidiary Guarantors
are to be made shall be identical in all material respects to those provisions
set forth in Articles Ten, Eleven and Twelve of the Senior Subordinated
Indenture dated March 15, 1996.

     (S) 2.4  Waiver and Consent - Prepayment of Eurodollar Loans.  The Company
proposes to use the proceeds of the new Senior Subordinated Notes to prepay the
Loans, which may include Eurodollar Loans.  Such proposed prepayment may violate
(a) Section 2.07(a)(ii) of the Credit Agreement, which permits the prepayment of
a Eurodollar Loan only on the last day of an Interest Period for such Eurodollar
Loan, except at the end of the related Interest Period, and (b) Section 4.04 of
the Credit Agreement, which requires that the Company give notice to Agent and
Lenders at least (i) one Business Day prior to the prepayment of a Base Rate
Loan and (ii) three Business Days prior to the prepayment of a Eurodollar Loan.
Lenders hereby consent to, and waive any Default or Event of Default under
Sections 2.07 and 4.04 of the Credit Agreement occurring as a result of, the
prepayment of such Loans; provided the Company shall, pursuant to Section 5.05
of the Credit Agreement, promptly pay to each Lender any breakage costs
associated with the prepayment of any Eurodollar Loans.

                  ARTICLE III. -- Conditions of Effectiveness

     (S) 3.1.  Effective Date.  This Amendment shall become effective as of the
date first above written when and only when (i) Agent shall have received, at
Agent's office, a counterpart of this Amendment executed and delivered by the
Company and each Lender, and (ii) Agent shall have

                                      -3-
<PAGE>
 
additionally received all of the following documents, each document (unless
otherwise indicated) being dated the date of receipt thereof by Agent, duly
authorized, executed and delivered, and in form and substance satisfactory to
Agent:

          (A) Officer's Certificate.  A certificate of a duly authorized officer
     of the Company 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.

          (B) Supporting Documents.  (I) A certificate of the Secretary of the
     Company dated the date of this Amendment certifying that attached thereto
     is a true and complete copy of resolutions adopted by the Board of
     Directors of the Company authorizing the execution, delivery and
     performance of the Amendment Documents and certifying the names and true
     signatures of the officers of the Company authorized to sign the Amendment
     Documents and (II) such supporting documents as Agent may reasonably
     request.

                 ARTICLE IV. -- Representations and Warranties

     (S) 4.1.  Representations and Warranties of the Company.  In order to
induce Agent and Lenders to enter into this Amendment, the Company represents
and warrants to Agent and Lenders that:

               (a) The representations and warranties contained in Section 7 of
     the Original Agreement, are true and correct at and as of the time of the
     effectiveness hereof, subject to the amendment of certain of the Schedules
     to the Credit Agreement as attached hereto.

               (b) The Company and the Subsidiaries are duly authorized to
     execute and deliver this Amendment and the other Amendment Documents to the
     extent a party thereto, and the Company is and will continue to be duly
     authorized to borrow and perform its obligations under the Credit
     Agreement. The Company and the Subsidiaries have duly taken all corporate
     action necessary to authorize the execution and delivery of this Amendment
     and the other Amendment Documents, to the extent a party thereto, and to
     authorize the performance of their respective obligations thereunder.

               (c) The execution and delivery by the Company and the
     Subsidiaries of this Amendment and the other Amendment Documents, to the
     extent a party thereto, the performance by the Company and the Subsidiaries
     of their 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 law, statute, rule or
     regulation or of the certificate or articles of incorporation and bylaws of
     the Company or any Subsidiary, or of any material agreement, judgment,
     license, order or permit applicable to or binding upon the Company or any
     Subsidiary, or result in the creation of any lien, charge or encumbrance
     upon any assets or properties of the Company or any Subsidiary, except in
     favor of Agent for the benefit of Lenders. Except for those which have been
     duly obtained, no consent, approval, authorization or order of any court or
     governmental authority or third party is required in connection with the
     execution and delivery by the

                                      -4-
<PAGE>
 
     Company or any Subsidiary of this Amendment or any other Amendment
     Document, to the extent a party thereto, or to consummate the transactions
     contemplated hereby and thereby.

               (d) When this Amendment and the other Amendment Documents have
     been duly executed and delivered, each of the Basic Documents, as amended
     by this Amendment and the other Amendment Documents, will be a legal and
     binding instrument and agreement of the Company and the Subsidiaries, 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 and
     to general principles of equity).

                          ARTICLE V. -- Miscellaneous

     (S) 5.1.  Ratification of Agreements.  The Original Agreement, as hereby
amended, is hereby ratified and confirmed in all respects.  The Basic Documents,
as they may be amended or affected by this Amendment and/or the other Amendment
Documents, are hereby ratified and confirmed in all respects.  Any reference to
the Credit Agreement in any Basic 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 or
therein, operate as a waiver of any right, power or remedy of Agent or any
Lender under the Credit Agreement or any other Basic Document nor constitute a
waiver of any provision of the Credit Agreement or any other Basic Document.

     (S) 5.2.  Ratification of Security Documents.  The Company, Agent and
Lenders each acknowledge and agree that any and all indebtedness, liabilities or
obligations arising under or in connection with the Notes are Obligations and is
secured indebtedness under, and is secured by, each and every Security Document
to which the Company is a party.  The Company hereby re-pledges, re-grants and
re-assigns a security interest in and lien on every asset of the Company
described as collateral in any Security Document.

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

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

                                      -5-
<PAGE>
 
     (S) 5.5.  GOVERNING LAW.  THIS AMENDMENT AND THE OTHER AMENDMENT DOCUMENTS
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.6.  Counterparts.  This Amendment and each of the other Amendment
Documents 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 or Amendment Document, as the
case may be.

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


                              PLAINS RESOURCES INC.


                              By: /c/ Michael R. Patterson
                                 -----------------------------------------
                                 Michael R. Patterson
                                 Vice President


                              ING (U.S.) CAPITAL CORPORATION,
                              f/k/a Internationale Nederlanden (U.S.) Capital
                              Corporation, individually as a Lender and as
                              Agent


                              By: /c/ Christopher R. Wagner
                                 -----------------------------------------
                                 Christopher R. Wagner, Vice President


                              BANKBOSTON, N.A., Lender


                              By: /c/ H. Louis Bailey
                                 -----------------------------------------
                                 H. Louis Bailey, Managing Director

                                      -6-
<PAGE>
 
                              DEN NORSKE BANK ASA, Lender



                              By: /c/ Byron L. Cooley
                                 -----------------------------------------
                                 Byron L. Cooley, Senior Vice President



                              By: /c/ William V. Moyer
                                 -----------------------------------------
                                 William V. Moyer, First Vice President



                              WELLS FARGO BANK (TEXAS),
                              NATIONAL ASSOCIATION
                              (f/k/a First Interstate Bank of Texas, N.A.),
                              Lender


                              By: /c/ Ann M. Rhoads
                                 -----------------------------------------
                                 Ann M. Rhoads, Vice President


                              TEXAS COMMERCE BANK NATIONAL ASSOCIATION, Lender


                              By: /c/ Russell A. Johnson
                                 -----------------------------------------
                                 Russell A. Johnson, Vice President



                              COMERICA BANK-TEXAS, Lender


                              By: /c/ Daniel G. Steele
                                 -----------------------------------------
                                 Daniel G. Steele, Senior Vice President

                                      -7-
<PAGE>
 
                             CONSENT AND AGREEMENT

     Each of the undersigned Subsidiary Guarantors 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 Amended and Restated
Guaranty dated April 11, 1996 made by it for the benefit of Agent and Lenders,
and (iv) expressly acknowledges and agrees that such Subsidiary Guarantor
guarantees all indebtedness, liabilities and obligations arising under or in
connection with the Notes pursuant to the terms of such Amended and Restated
Guaranty, and agrees that its obligations and covenants thereunder are
unimpaired hereby and shall remain in full force and effect.  Each of the
undersigned hereby further agrees that any obligation of the Company arising
pursuant to Section 2.10 of the Credit Agreement shall constitute "Obligations"
under the Guaranty.

                                     PLAINS MARKETING & TRANSPORTATION INC.  
                                     PLAINS RESOURCES INTERNATIONAL INC.     
                                     PLAINS TERMINAL & TRANSFER CORPORATION  
                                     PLX CRUDE LINES INC.                    
                                     STOCKER RESOURCES, INC.                 
                                     PLX INGLESIDE INC.                      
                                     CALUMET FLORIDA, INC.                   
                                     PLAINS ILLINOIS INC.                     


                                     By: /c/ Michael R. Patterson
                                        -------------------------------------
                                        Michael R. Patterson, Vice President


                                     STOCKER RESOURCES, L.P.
 
                                     By:  Stocker Resources, Inc.,
                                          its General Partner


                                     By: /c/ Michael R. Patterson
                                        -------------------------------------
                                        Michael R. Patterson, Vice President

                                      -8-