Document:

<PAGE>
                                                                    EXHIBIT 10.5

                                                                  CONFORMED COPY

                           FIRST AMENDED AND RESTATED
                     FEDERAL INCOME TAX ALLOCATION AGREEMENT

         Agreement made and entered into effective as of the 10th day of May
2002 by and among Gulf Polymer & Petrochemical, Inc. (GPPI), a Delaware
corporation and Westlake Chemical Corporation, a Delaware corporation; Westlake
Olefins Corporation, a Delaware corporation; Westlake Polymers LP, a Delaware
limited partnership, as successor in interest to Westlake Polymers Corporation,
a Delaware corporation; Westlake Petrochemicals LP, a Delaware limited
partnership, as successor in interest to Westlake Petrochemicals Corporation, a
Delaware corporation and WPE Corporation, a Delaware corporation; Westlake
Management Services, Inc., a Delaware corporation; Westlake Resources
Corporation, a Delaware corporation; Westlake Monomers Corporation, a Delaware
corporation; Westlake PVC Corporation, a Delaware corporation; North American
Pipe Corporation, a Delaware corporation; Westlake Vinyl Corporation, a Delaware
corporation; Westlake International Corporation, a Delaware corporation; Van
Buren Pipe Corporation (formerly NAPCO Manufacturing Corporation), a Delaware
corporation; Westech Building Products, Inc. (formerly PVC Pipe Manufacturing
Corporation), a Delaware corporation; WPT LP, a Delaware limited partnership, as
successor in interest to WPT Corporation, a Delaware corporation; Westlake AR
Corporation, a Delaware corporation; Westlake CA&O Corporation, a Delaware
corporation; Westlake Polymer & Petrochemical, Inc., a Delaware corporation;
Westlake Technology Corporation, a Delaware corporation; Westlake Styrene LP, a
Delaware limited partnership, as successor in interest to Westlake Styrene
Corporation, a Delaware Corporation; North American Profiles, Inc. (formerly
Westech Windows, Inc.) a Delaware Corporation, Westlake Chemical Holdings, Inc.,
a Delaware Corporation; Westlake Chemical Manufacturing, Inc., a Delaware
corporation; Westlake Chemical Investments, Inc., a Delaware corporation;
Westlake Chemical Products, Inc., a Delaware corporation; Westlake Development
Corporation, a Delaware corporation; Gramercy Chlor-Alkali Corporation, a
Delaware corporation (collectively, the "GPPI Subsidiaries" and individually a
"GPPI Subsidiary").

         WHEREAS, GPPI is the common parent and each of the GPPI Subsidiaries is
a member of an affiliated group of corporations within the meaning of Section
1504 (a) of the Internal Revenue Code of 1986, as amended (the "Code") (such
affiliated group as constituted from time to time is hereinafter referred to as
the GPPI Group) which files a consolidated federal income tax return; and

         WHEREAS, GPPI and the GPPI Subsidiaries agree that it would be mutually
beneficial to provide for payments by the GPPI subsidiaries to GPPI (or by GPPI
to the GPPI Subsidiaries) in respect of the federal income tax payable (or
federal income tax receivable) by the GPPI Group;

<PAGE>

         WHEREAS, GPPI and the GPPI subsidiaries entered into as of the 7th day
of April, 1995 a Federal Income Tax Allocation Agreement which agreement was
amended effective August 29, 1997, April 6, 2000 and January 1, 2001 to include
additional GPPI subsidiaries (the agreement as amended being hereinafter
referred to as the "Agreement"); and,

         WHEREAS, GPPI and the GPPI subsidiaries desire to amend and restate the
Agreement in its entirety.

         NOW, THEREFORE, in consideration of their covenants contained herein,
GPPI, and the GPPI Subsidiaries do hereby agree to amend and restate the
Agreement in its entirety according to the terms contained herein.

         1.       Consolidated Federal Income Tax Returns and Payment of
                  Consolidated Tax Liability

         If GPPI files consolidated federal income tax returns, so long as my
GPPI Subsidiary is a member of the GPPI Group, it shall join in the filing by
GPPI of its consolidated federal income tax return, and shall file such
consents, elections and other documents as my be necessary or appropriate to
carry out the purposes of this Section 1. GPPI shall be responsible for the
payment of all federal income taxes for the GPPI Group to the Internal Revenue
Service ("IRS"), and shall be entitled to receive all refunds of such taxes.
GPPI is hereby irrevocably constituted the exclusive agent and attorney-in-fact
of the GPPI Group to file such returns, pay such taxes, and take any action
reasonably necessary or appropriate in connection with the determination of the
ultimate liability of the GPPI Group for such tax, including, without limiting
the generality of the foregoing, contesting the assessment of any deficiency,
entering into any closing agreement, compromise or settlement, filing any
amended return, and prosecuting any action for a refund, on behalf of the GPPI
Group.

         2.       Payment by the GPPI Subsidiaries to GPPI in Respect of the
                  GPPI Subsidiaries' Tax Liability

                  (a) During each of GPPI's taxable years for which it files a
consolidated federal income tax return in which any GPPI Subsidiary is a member
(a "Consolidated Return Year") each GPPI Subsidiary will deposit with GPPI prior
to or concurrent with the due date of each quarterly estimated tax payment of
GPPI to the IRS, an amount established by an officer of GPPI and such GPPI
Subsidiary as appropriately reflecting the estimated tax (if any) which would be
payable by such GPPI Subsidiary on such date if it filed a separate federal
income tax return for such year. On or prior to the 30th day following the
filing of the GPPI Group's consolidated federal income tax return for a
Consolidated Return Year, payment shall be made by such GPPI Subsidiary to GPPI
or by GPPI to such GPPI Subsidiary, as appropriate, to reflect the difference
between the amounts paid by such GPPI Subsidiary to GPPI in respect of the
estimated taxes for such

<PAGE>

Consolidated Return Year and the amount of federal income tax which such GPPI
Subsidiary would have paid for such Consolidated Return year if it had filed a
separate federal income tax return for such year.

                  (b) In computing the amount of a GPPI Subsidiary's federal
income tax for any Consolidated Return Year under (a) above, such GPPI
Subsidiary will not take into account any tax attribute from any prior years
(computed on the basis described in (a) above) to the extent that any such
attribute was the basis for a payment by GPPI to such GPPI Subsidiary with
respect to a prior Consolidated Return Year under Section 3 below; provided,
however, that such incident shall be taken into account (i) in the event such
payment is refunded by such GPPI Subsidiary to GPPI pursuant to Section 4(a); or
(ii) if such GPPI Subsidiary elects to refund such prior payments to GPPI.

3.       Payment by GPPI to the GPPI Subsidiaries for Use of the GPPI
         Subsidiaries' Tax Attributes ,

         If for any Consolidated Return Year, any GPPI Subsidiary has a tax
attribute (such as a net operating loss or credit) that reduces the consolidated
tax liability of the GPPI Group, GPPI shall pay to such GPPI Subsidiary the
amount of such reduction within 30 days after the filing of the return, or in
the case of a refund--30 days within receipt of a refund. If the GPPI Group has
sufficient taxable income to absorb the tax attributes of all GPPI Subsidiaries
that have such tax attributes, the amount of reduction shall equal the excess
amount that would be paid by the GPPI Group if the GPPI Subsidiary did not have
such tax attribute. If the GPPI Group does not have sufficient taxable income to
absorb the tax attributes of all GPPI Subsidiaries, the amount of the reduction
shall be computed as follows: First, as to each Subsidiary that has such tax
attributes, compute the amount by which such GPPI Subsidiary's attributes would
reduce the consolidated tax liability (the "Maximum Reduction") of the GPPI
Group if the GPPI Group had sufficient taxable income to absorb the tax
attributes of all GPPI Subsidiaries. Second, compute the actual tax reduction
(the "Actual Reduction") in the consolidated tax liability of the GPPI Group
caused by all the tax attributes of all GPPI Subsidiaries that have such tax
attributes, such amount being the difference between the amount of the GPPI
Group consolidated tax liability if the GPPI Subsidiaries had not incurred all
such tax attributes over the actual consolidated tax liability of the GPPI
Group. The amount of reduction attributable to the attributes of any GPPI
Subsidiary shall then equal the product of the Actual Reduction and a fraction,
the numerator of which is the Maximum Reduction with respect to such GPPI
Subsidiary and the denominator of which is the aggregate Maximum Reductions for
all GPPI Subsidiaries.

4.       Audit Adjustments and Other Matters

                  (a) In the event a "determination" within the meaning of
section 1313 of the Code is reached or upon filing of an amended return which
results in any adjustment to the tax returns of the GPPI Group or of any GPPI
Subsidiary, the liabilities of GPPI and the GPPI Subsidiaries under Sections 2
and 3 above, including any applicable penalties and interest thereon, shall be
redetermined to give effect to such adjustment.

<PAGE>

Payments by GPPI and the GPPI Subsidiaries to reflect any such
finally-determined liabilities, including interest payable thereon measured from
the date 120 days after the end of the year to which such adjustment relates,
shall be made within 120 days after the determination causing such adjustment is
reached.

                  (b) If any payment required by this Agreement is not timely
paid, interest shall accrue on the unpaid amount at the rate provided with
respect to deficiencies under the Code or under any successor act.

                  (c) An officer of GPPI and each GPPI Subsidiary affected by a
particular calculation required under this Agreement will review such
calculation and agree thereto. The final decision of such officers will control
for financial reporting and for purposes of settlement between GPPI and such
GPPI Subsidiary, unless otherwise determined by the respective Boards of
Directors of GPPI and such GPPI Subsidiary.

                  (d) GPPI and each GPPI Subsidiary will each have access to the
books, records and papers of the other which bear upon the calculations and
determinations hereunder and will each have the right to participate in and be
kept fully informed about IRS examinations, similar state examinations, and
other administrative and judicial proceedings which could bear upon the amount
of payments hereunder.

                  (e) For purposes of this Agreement, the federal income tax
liability which each member of the GPPI Group would incur if it were filing a
separate return, and any payments made in respect thereof, shall be determined
in accordance with Treas. Reg. Section 1.1552-1(a)(2) Notwithstanding the
foregoing, in the event that alternative minimum tax is payable, the alternative
minimum tax shall be apportioned among GPPI and the GPPI Group in accordance
with Sections 2 and 3 above.

         5. Term

                  (a) This First Amended and Restated Federal Income Tax
Allocation Agreement shall retain the effective date of the Agreement, November
1, 1993, and shall continue in effect until terminated or canceled, as
hereinafter provided. If terminated or canceled, the Agreement shall
nevertheless continue to apply to all Consolidated Return Years and that part of
any Consolidated Return Year ending prior to the date of cancellation or
termination including adjustments pursuant to Section 4 with respect to such
years.

                  (b) This Agreement may be canceled by GPPI as of the first day
of any month with respect to any GPPI Subsidiary by giving such GPPI Subsidiary
notice of such cancellation.

                  (c) This Agreement shall terminate with respect to a
particular GPPI Subsidiary if GPPI and such GPPI Subsidiary cease to be included
in the same consolidated federal income tax return of the GPPI Group.

<PAGE>

         6. General

                  (a) This Agreement supersedes all prior agreements between
GPPI and the GPPI Subsidiaries pertaining to the subject matter of this
Agreement.

                  (b) GPPI and each GPPI Subsidiary agree that if such
Subsidiary merges into, is consolidated with, or transfers substantially all its
assets to another consolidated corporation within the GPPI Group, such surviving
corporation shall succeed to the rights and obligations of such GPPI Subsidiary
herein, and all covenants and agreements in this Agreement shall be binding
upon, and shall inure to the benefit of, such surviving corporation.

                  (c) The parties intend that this Agreement shall apply to all
corporations which are or which may become members of the GPPI Group. GPPI and
the GPPI Subsidiaries agree that they will make every reasonable effort to
ensure that any corporation that becomes a member of the GPPI Group agrees to be
bound by the terms of this Agreement.

                  (d) Except as provided in (b) above, this Agreement may not be
assigned by any party without the other parties' prior written consent.

                  (e) The validity, interpretation and performance of this
Agreement will be controlled and construed under the laws of the State of
Delaware.

                  (f) This Agreement may be executed simultaneously in several
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

                  (g) All notices hereunder shall be in writing.

IN WITNESS WHEREOF, the. parties hereto have duly executed this Agreement on the
day and year first above indicated.

                         [SIGNATURES ON FOLLOWING PAGE]

<PAGE>

GULF POLYMER AND PETROCHEMICAL, INC.
WESTLAKE CHEMICAL CORPORATION
WESTLAKE OLEFINS CORPORATION
WESTLAKE MANAGEMENT SERVICES, INC.
WESTLAKE RESOURCES CORPORATION
WESTLAKE MONOMERS CORPORATION
WESTLAKE PVC CORPORATION
WESTLAKE VINYL CORPORATION
WESTLAKE INTERNATIONAL CORPORATION
WESTLAKE CA&O CORPORATION
WESTLAKE TECHNOLOGY CORPORATION
WESTLAKE POLYMER & PETROCHEMICAL, INC
WESTLAKE AR CORPORATION
WESTLAKE CHEMICAL INVESTMENTS, INC.
WESTLAKE CHEMICAL HOLDINGS, INC.
WESTLAKE DEVELOPMENT CORPORATION
GRAMERCY CHLOR-ALKALI CORPORATION

By:         /s/ A. Chao
     ------------------------------------------------
            Albert Chao, President

WESTLAKE POLYMERS LP
WESTLAKE PETROCHEMICALS LP
By: WESTLAKE CHEMICAL INVESTMENTS, INC., General Partner

By:         /s/ A. Chao
     ------------------------------------------------
            Albert Chao, President

WPT LP
WESTLAKE STYRENE LP
By: WESTLAKE CHEMICAL HOLDINGS, INC., General Partner

By:         /s/ A. Chao
     ------------------------------------------------
            Albert Chao, President

WESTLAKE CHEMICAL MANUFACTURING, INC.
WESTLAKE CHEMICAL PRODUCTS, INC.

By:         /s/ Harold F. Kalbach, Jr.
     ------------------------------------------------
            Harold F. Kalbach, Jr. Vice President

NORTH AMERICAN PIPE CORPORATION
VAN BUREN PIPE CORPORATION
WESTECH BUILDING PRODUCTS, INC.
NORTH AMERICAN PROFILES, INC.

By:         /s/ John A. Labuda
     ------------------------------------------------
            John A. Labuda, President<PAGE>

                                                                    EXHIBIT 10.6

                                                                  CONFORMED COPY

                                  AMENDMENT TO
                         THE FIRST AMENDED AND RESTATED
                     FEDERAL INCOME TAX ALLOCATION AGREEMENT

                  Amendment dated as of August 1, 2003 (this "Amendment") to the
First Amended and Restated Federal Income Tax Allocation Agreement dated as of
May 10, 2002 (the "Tax Allocation Agreement") by and among Gulf Polymer &
Petrochemical, Inc., a Delaware corporation ("GPPI") and the following entities:
Westlake Chemical Corporation, a Delaware corporation ("WCC"); Westlake Olefins
Corporation, a Delaware corporation; Westlake Polymers LP, a Delaware limited
partnership, as successor in interest to Westlake Polymers Corporation, a
Delaware corporation; Westlake Petrochemicals LP, a Delaware limited
partnership, as successor in interest to Westlake Petrochemicals Corporation, a
Delaware corporation and WPE Corporation, a Delaware corporation; Westlake
Management Services, Inc., a Delaware corporation; Westlake Resources
Corporation, a Delaware corporation; Westlake Monomers Corporation, a Delaware
corporation; Westlake PVC Corporation, a Delaware corporation; North American
Pipe Corporation, a Delaware corporation; Westlake Vinyl Corporation, a Delaware
corporation; Westlake International Corporation, a Delaware corporation; Van
Buren Pipe Corporation (formerly NAPCO Manufacturing Corporation), a Delaware
corporation; Westech Building Products, Inc. (formerly PVC Pipe Manufacturing
Corporation), a Delaware corporation; WPT LP, a Delaware limited partnership, as
successor in interest to WPT Corporation, a Delaware corporation; Westlake AR
Corporation, a Delaware corporation; Westlake CA&O Corporation, a Delaware
corporation; Westlake Polymer & Petrochemical, Inc., a Delaware corporation;
Westlake Technology Corporation, a Delaware corporation; Westlake Styrene LP, a
Delaware limited partnership, as successor in interest to Westlake Styrene
Corporation, a Delaware Corporation; North American Profiles, Inc. (formerly
Westech Windows, Inc.) a Delaware Corporation, Westlake Chemical Holdings, Inc.,
a Delaware Corporation; Westlake Chemical Manufacturing, Inc., a Delaware
corporation; Westlake Chemical Investments, Inc., a Delaware corporation;
Westlake Chemical Products, Inc., a Delaware corporation; Westlake Development
Corporation, a Delaware corporation; Gramercy Chlor-Alkali Corporation, a
Delaware corporation (collectively, the "GPPI Subsidiaries" and each
individually a "GPPI Subsidiary").

                  WHEREAS, certain of the GPPI Subsidiaries have entered into an
Indenture dated as of July 31, 2003 (the "Indenture") by and among WCC, each of
the guarantors named therein and JPMorgan Chase Bank, as trustee, in regard to 8
3/4% Senior Notes due 2011 of WCC; and

                  WHEREAS, the Indenture restricts certain payments by WCC and
its Restricted Subsidiaries (as defined in the Indenture) and certain
transactions between WCC and its Restricted Subsidiaries, on one hand, and any
other affiliate thereof, on the other hand; and

                  WHEREAS, GPPI and the GPPI Subsidiaries desire to amend the
Tax Allocation Agreement to prohibit any payments by WCC and its Restricted
Subsidiaries that would not constitute Permitted Payments to Parent (as defined
in the Indenture); and

<PAGE>

                  WHEREAS, the Tax Allocation Agreement, as amended by this
Amendment, is, taken as a whole, not materially less favorable to WCC and its
Restricted Subsidiaries than the Tax Allocation Agreement prior to this
Amendment;

                  NOW, THEREFORE, in consideration of the premises and mutual
agreements set forth herein and in the Tax Allocation Agreement, the parties
agree as follows:

                  Section 1. New Section 7 to Tax Allocation Agreement. The
following is hereby added to the Tax Allocation Agreement as a new Section 7:

                       7. Prohibited Payments.

                           Notwithstanding anything to the contrary in this
                  Agreement, no payment shall be made under this Agreement by
                  Westlake Chemical Corporation or any other GPPI Subsidiary
                  that is a "Restricted Subsidiary" under the Indenture, dated
                  as of July 31, 2003 (as amended and supplemented from time to
                  time, the "Indenture"), by and among Westlake Chemical
                  Corporation, each of the guarantors named therein and JPMorgan
                  Chase Bank, as trustee, unless such payment would constitute a
                  "Permitted Payment to Parent" under the Indenture.

                  Section 2. Miscellaneous.

                  (a) This Amendment shall be effective as of the date first
         above written, and, except as set forth herein, the Tax Allocation
         Agreement shall remain in full force and effect and shall be otherwise
         unaffected hereby.

                  (b) This Amendment may be executed in two or more
         counterparts, each of which shall be deemed to be an original, but all
         for which together shall constitute one and the same instrument.

                  (c) The validity, interpretation and performance of this
         Amendment will be controlled and construed under the laws of the State
         of Delaware.

                            [Signature pages follow.]

<PAGE>

                  IN WITNESS WHEREOF, the parties hereto have duly executed this
Amendment on the date first indicated above.

                                     GULF POLYMER AND PETROCHEMICAL, INC.
                                     WESTLAKE CHEMICAL CORPORATION
                                     WESTLAKE OLEFINS CORPORATION
                                     WESTLAKE MANAGEMENT SERVICES, INC.
                                     WESTLAKE RESOURCES CORPORATION
                                     WESTLAKE VINYLS, INC., AS SUCCESSOR IN
                                       INTEREST TO WESTLAKE
                                       MONOMERS CORPORATION AND WESTLAKE CA&O
                                       CORPORATION
                                     WESTLAKE PVC CORPORATION
                                     WESTLAKE VINYL CORPORATION
                                     WESTLAKE INTERNATIONAL CORPORATION
                                     WESTLAKE TECHNOLOGY CORPORATION
                                     WESTLAKE POLYMER & PETROCHEMICAL, INC.
                                     WESTLAKE AR CORPORATION
                                     WESTLAKE CHEMICAL INVESTMENTS, INC.
                                     WESTLAKE CHEMICAL HOLDINGS, INC.
                                     WESTLAKE DEVELOPMENT CORPORATION
                                     GRAMERCY CHLOR-ALKALI CORPORATION
                                     GVGP, INC.

                                     By: /s/ A. Chao
                                         ---------------------------------------
                                         Albert Chao, President

                                     WESTLAKE POLYMERS LP
                                     WESTLAKE PETROCHEMICALS LP
                                     BY: WESTLAKE CHEMICAL INVESTMENTS, INC.,
                                         GENERAL PARTNER

                                     By: /s/ A. Chao
                                         ---------------------------------------
                                         Albert Chao, President

                                     WPT LP
                                     WESTLAKE STYRENE LP
                                     BY: WESTLAKE CHEMICAL HOLDINGS, INC.,
                                         GENERAL PARTNER

                                     By: /s/ A. Chao
                                         ---------------------------------------
                                         Albert Chao, President

<PAGE>

                                     WESTLAKE CHEMICAL MANUFACTURING, INC.
                                     WESTLAKE CHEMICAL PRODUCTS, INC.

                                     By: /s/ Harold. F. Kalbach, Jr.
                                         ---------------------------------------
                                         Harold F. Kalbach, Jr., Vice President

                                     NORTH AMERICAN PIPE CORPORATION
                                     VAN BUREN PIPE CORPORATION
                                     WESTECH BUILDING PRODUCTS, INC.
                                     NORTH AMERICAN PROFILES, INC.

                                     By: /s/ John A. Labuda
                                         ---------------------------------------
                                         John A. Labuda, President

                                     GEISMAR VINYLS COMPANY LP
                                     BY: GVGP, INC., GENERAL PARTNER

                                     By: /s/ A. Chao
                                         ---------------------------------------
                                         Albert Chao, President

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