<PAGE>
                                                                   EXHIBIT 10.17

                                                           Execution Counterpart


                                SECOND AMENDMENT
                   TO AMENDED AND RESTATED CREDIT AGREEMENT


            This Second Amendment to Amended and Restated Credit Agreement (this
"Agreement") dated as of July 1, 2001 is entered into by and among Texas
Petrochemicals LP, a Texas limited partnership (the "Company"), TPC Holding
Corp., a Delaware corporation (the "Parent"), those Lenders that execute a
counterpart of this Agreement and The Chase Manhattan Bank (the successor by
merger to Chase Bank of Texas, National Association), individually as a Lender
and the Swing Line Lender and as agent for the other Lenders (in such latter
capacity together with any other Person who becomes the agent, the "Agent"), ABN
AMRO North America, Inc. as agent for ABN AMRO Bank, N.V., and The Bank of Nova
Scotia, each individually as a Lender and together as co-documentation agents
for the other Lenders (in such capacity, together with any other Person who
becomes a documentation agent, the "Documentation Agents").

            WHEREAS, the Company, the Parent, the Lenders, the Agent, the Swing
Line Lender and the Documentation Agents are parties to that certain Amended and
Restated Credit Agreement dated as of June 30, 2000, as amended by a First
Amendment to Amended and Restated Credit Agreement dated as of January 1, 2001
(the Amended and Restated Credit Agreement as so amended, the "Credit
Agreement"; capitalized terms used herein, unless otherwise defined, are used as
defined in the Credit Agreement); and

            WHEREAS, the Company has requested the Lenders to amend certain
provisions of the Credit Agreement.

            NOW, THEREFORE, in consideration of the premises and for other good
and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereto hereby agree as follows:

            1. Amendment to Section 1.01. The definition of "EBITDA" contained
in Section 1.01 of the Credit Agreement is hereby amended in its entirety to
read as follows:

            " 'EBITDA' means, with respect to the Company and its Subsidiaries
      determined on a consolidated basis for the four fiscal quarters
      immediately preceding the most recent Financial Statement Delivery Date,
      without duplication, the result of net income less any non-cash income to
      the extent included in determining net income and without giving effect to
      any non-recurring items, extraordinary gains or losses from the sale of
      assets or write down in the value of assets owned by the Company and
      Subsidiaries for such period plus depreciation, amortization, Interest
      Expense, taxes, non-recurring losses incurred as a result of fire and
      flood damage (which in the case of such non-recurring losses shall not
      exceed $13,400,000 for the fiscal quarter ended June 30, 2001 and
      $10,400,000 for the fiscal quarter ended September 30, 2001), and other
      non-cash charges for such period to the extent deducted in determining net
      income.".

<PAGE>
            2. Amendment to Section 8.13(b). Clauses (i) and (j) of Section
8.13(b) of the Credit Agreement are hereby deleted and the following clauses
(i), (j) and (k) substituted therefor:

            "(i) for the period from July 1, 2002 to and including September 30,
      2002, greater than 4.5 to 1.0, (j) for the period from October 1, 2002 to
      and including June 30, 2003, greater than 3.0 to 1.0 and (k) for the
      period from July 1, 2003 to and including June 30, 2004, greater than 3.0
      to 1.0,".

            3. Ratification. (a) The Credit Agreement, the Notes and the other
Loan Documents, as amended and affected by this Agreement, shall continue in
full force and effect, and are hereby ratified and confirmed; and

            (b) Nothing in this Agreement releases any right, claim, lien,
security interest or entitlement of the Agent or any Lender created by or
contained in any of such documents nor is the Company or any other Person
released from any covenant, warranty or obligation created by or contained
therein.

            4. Representations and Warranties. The Company hereby represents and
warrants to the Lenders that (a) the Credit Agreement as amended by this
Agreement has been duly authorized, executed and delivered on behalf of the
Company, (b) this Agreement constitutes a valid and legally binding agreement
enforceable against the Company in accordance with its terms except as such
enforceability may be limited by bankruptcy, insolvency, reorganization,
moratorium, fraudulent transfer or other similar laws relating to or affecting
the enforcement of creditors' rights generally, and by general principles of
equity (regardless of whether such enforceability is considered in a proceeding
in equity or at law), (c) after giving effect to this Agreement, the
representations and warranties by the Company contained in the Credit Agreement
and in the other Loan Documents are true and correct on and as of the date
hereof in all material respects as though made as of the date hereof (unless any
such representation or warranty expressly relates to an earlier date or is no
longer true solely as a result of transactions not prohibited by the Credit
Agreement, as amended by this Agreement, and the other Loan Documents) and (d)
after giving effect to this Agreement, no Default exists under the Credit
Agreement or any of the other Loan Documents.

            5. Reference to the Credit Agreement and Effect on the Notes and
Other Loan Documents.

            (a) Upon the effectiveness of the amendments set forth in Sections 1
and 2, each reference in the Credit Agreement to "this Agreement", "hereunder,"
"herein" or words of like import shall mean and be a reference to the Credit
Agreement, as amended and affected hereby.

            (b) Upon the effectiveness of the amendments set forth in Sections 1
and 2, each reference in the Notes and the other Loan Documents to "the Credit
Agreement" shall mean and be a reference to the Credit Agreement, as amended and
affected hereby.

                                       2
<PAGE>
            6. Counterparts. This Agreement may be signed in any number of
counterparts, each of which shall be construed as an original, but all of which
together shall constitute one and the same instrument.

            7. Ratification by Other Parties. By its execution of this Agreement
each of the Parent, the Limited Partner, Holding Co. and Texas Butylene Chemical
Corporation hereby consents and agrees to the provisions of this Agreement,
represents and warrants that the representations by it and its Subsidiaries
contained in Article VI of the Credit Agreement, as amended hereby, are true and
correct in all material respects as though made as of the date hereof (unless
any such representation and warranty expressly relates to an earlier date or is
no longer true solely as a result of transactions not prohibited by the Credit
Agreement, as amended hereby, and the other Loan Documents), and ratifies and
confirms the Loan Documents to which it is a party, as amended and affected
hereby.

            8. Effectiveness of Agreement. This Agreement shall become effective
upon (a) the execution hereof by the Company, the Parent, the Limited Partner,
Holding Co., Texas Butylene Chemical Corporation and Lenders constituting the
Majority Lenders under the Credit Agreement (whether or not all Lenders listed
on the signature pages hereof execute this Agreement) and (b) the payment to the
Administrative Agent for the account of each Lender executing this Agreement of
an amendment fee equal to .075% of such Lender's Commitment..

            9. Choice of Law. THIS AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED
IN ACCORDANCE WITH THE LAWS OF THE STATE OF TEXAS, EXCEPT TO THE EXTENT THAT THE
LAWS OF THE UNITED STATES OF AMERICA, AND ANY RULES, REGULATIONS OR ORDERS
ISSUED OR PROMULGATED THEREUNDER APPLICABLE TO THE AFFAIRS AND TRANSACTIONS OF
THE LENDER OTHERWISE PREEMPT TEXAS LAW, IN WHICH EVENT SUCH FEDERAL LAW SHALL
CONTROL.

            10. Final Agreement of the Parties. THE CREDIT AGREEMENT, AS AMENDED
BY THIS AGREEMENT, AND THE OTHER LOAN DOCUMENTS (INCLUDING, WITHOUT LIMITATION,
ALL EXHIBITS AND SCHEDULES THERETO) CONSTITUTE A "LOAN AGREEMENT" AS DEFINED IN
SECTION 26.02(a) OF THE TEXAS BUSINESS AND COMMERCE CODE, AND REPRESENT THE
FINAL AGREEMENT AMONG THE PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF
PRIOR, CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS OF THE PARTIES. THERE ARE
NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                                       3
<PAGE>
            IN WITNESS WHEREOF, the parties hereto have caused this Agreement to
be executed by their respective officers thereunto duly authorized as of the
date first above written.

                                     Company:

                                     TEXAS PETROCHEMICALS LP

                                     By:   TPC HOLDING CORP.,
                                           as General Partner


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


                                     Parent:

                                     TPC HOLDING CORP.


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




                                       4