Document:

<PAGE>

                                                                    Exhibit 10.1

                          FIFTH AMENDMENT TO AMENDED
                         AND RESTATED CREDIT AGREEMENT

     THIS FOURTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this

"Amendment") is dated as of February 28, 2001 by and among TREX COMPANY, LLC, a
----------
Delaware limited liability company ("Borrower"), TREX COMPANY, INC., a Delaware
                                     --------
corporation ("Guarantor") and FIRST UNION NATIONAL BANK, a national banking
              ---------
association ("Bank").
              ----

                                R E C I T A L S

     A.  Borrower, Guarantor and Bank are parties to that certain Amended and
Restated Credit Agreement dated as of August 3, 1999, as amended by that certain
First Amendment to Amended and Restated Credit Agreement dated as of December
15, 1999, that certain Second Amendment to Amended and Restated Credit Agreement
dated as of April 27, 2000, that certain Third Amendment to Amended and Restated
Credit Agreement dated as of June 30, 2000 and that certain Fourth Amendment to
Amended and Restated Credit Agreement dated as of October 27, 2000 (the "Credit
                                                                         ------
Agreement").
---------

     B.  Borrower, Guarantor and Bank have agreed to amend certain of the
covenants in the Credit Agreement.

                               A G R E E M E N T

     NOW THEREFORE, in consideration of the mutual covenants herein and for Ten
Dollars and other good and valuable consideration, the receipt and adequacy of
which are hereby acknowledged, the parties hereto hereby agree as follows:

     1.  Incorporation of Recitals.  The Recitals set forth above are
         -------------------------
incorporated herein by this reference as if fully set forth in the text of this
Amendment.

     2.  Definitions.  Capitalized terms used in this Amendment and not
         -----------
otherwise defined herein shall have the meanings set forth in the Credit
Agreement.

     3.  Amendment.
         ---------

         a.  Section 6.17 of the Credit Agreement is hereby deleted in its
entirety and the following new Section 6.17 is substituted therefor:

                     Section 6.17 Limitations on Debt.  The Borrower will not
                                  -------------------
             permit the ratio of Total Consolidated Debt to Total Consolidated
             Capitalization, as a percentage, to exceed (i) sixty percent (60%)
             at any time up to and including June 29, 2001, and (ii) fifty
             percent (50%) on June 30, 2001 and thereafter.
<PAGE>

         b.  Section 6.18 of the Credit Agreement is hereby deleted in its
entirety and the following new Section 6.18 is substituted therefor:

                     Section 6.18 Funded Debt Coverage Ratio.  The Borrower will
                                  --------------------------
             not, as of the end of the fiscal quarter ending March 31, 2001,
             permit the ratio of (i) the Debt of the Borrower and its
             Consolidated Subsidiaries as of the end of such fiscal quarter, to
             (ii) Consolidated EBITDA for the four quarter period ended as of
             the end of such fiscal quarter, to be more than 2.5:1.0. The
             Borrower will not, as of the end of any fiscal quarter ending on or
             after June 30, 2001, permit the ratio of (i) the Debt of the
             Borrower and its Consolidated Subsidiaries as of the end of such
             fiscal quarter, to (ii) Consolidated EBITDA for the four quarter
             period ended as of the end of such fiscal quarter, to be more than
             2.0:1.0.

     4.  Representations and Warranties.  Each of Borrower and Guarantor
         ------------------------------
 hereby confirms to Bank that all representations and warranties of Borrower and
Guarantor contained in the Credit Agreement are true and correct as if made on
the date hereof.

     5.  Effectiveness.  This Amendment shall be and become effective as
         -------------
 of the date hereof when all of the conditions set forth below in this paragraph
5 shall have been satisfied:

         a.  Bank shall have received this Amendment, duly executed by the
Borrower and the Guarantor.

         b.  All fees and expenses of Bank in connection with this Amendment,
including legal fees and expenses incurred on or prior to the date of this
Amendment, shall have been paid by the Borrower.

         c.  Bank shall have received an opinion of counsel for
Borrower and
Guarantor in form satisfactory to Bank.

         d.  Bank shall have received from Borrower an amendment fee in the
amount of $15,000.

     6.  Full Force and Effect.  Except as specifically set forth herein, all
         ---------------------
 terms and conditions of the Credit Agreement and the other Loan Documents shall
remain unchanged and in full force and effect.

     7.  Binding Effect.  Each of Borrower and Guarantor hereby reaffirms its
         --------------
 covenant and agreement to perform, comply with and be bound by each and every
one of the terms and provisions of the Credit Agreement, as modified by this
Amendment.

                                       2
<PAGE>

     8.  Acknowledgment; No Novation.  Borrower, Guarantor and Bank agree that
         ---------------------------
 this Amendment shall not constitute a novation of the indebtedness evidenced by
the Revolving Note or any of the other Obligations.

     9.  Successors and Assigns.  This Amendment shall be binding upon and shall
         ----------------------
 inure to the benefit of the parties hereto and their respective heirs,
executors, administrators, personal representatives, successors and assigns.

     10. Severability.  In case any one or more of the provisions contained in
         ------------
 this Amendment shall be invalid, illegal or unenforceable, the validity and
enforceability of the remaining provisions contained herein shall not in any way
be affected or impaired thereby.

     11. Counterparts.  This Amendment may be executed by the parties hereto
         ------------
in two counterparts, each of which shall be deemed an original and both of which
shall constitute together but one and the same agreement.

                        [NO FURTHER TEXT ON THIS PAGE]

                                       3
<PAGE>

     The undersigned have caused this Amendment to be executed in the names and
under the seals of the undersigned, with the intent that this be a sealed
instrument.

                              BORROWER:

                              TREX COMPANY, LLC, a Delaware limited
                              liability company

                              By: /s/ Anthony J. Cavanna
                                  ----------------------------------  (SEAL)
                                  Anthony J. Cavanna
                                  Chief Financial Officer

                              GUARANTOR:

                              TREX COMPANY, INC., a Delaware corporation

                              By: /s/ Anthony J. Cavanna
                                  ----------------------------------  (SEAL)
                                  Anthony J. Cavanna
                                  Chief Financial Officer

                              BANK:

                              FIRST UNION NATIONAL BANK, a national
                              banking association

                              By: /s/ B. Scott Arthur
                                  ----------------------------------  (SEAL)
                                  B. Scott Arthur
                                  Vice President

                                       4<PAGE>

                                                                    Exhibit 10.2

                          LOAN MODIFICATION AGREEMENT

          This Loan Modification Agreement ("Agreement") is made as of March 30,
2001 by Trex Company, LLC, a Delaware Limited Liability Company ("Borrower), and
Bank of America, N.A. ("Bank").

                               Factual Background
                               ------------------

          A.  Under a Standing Loan Agreement dated as of September 28, 1999
between Bank and Borrower (the "Loan Agreement"), Bank made a loan to Borrower
in the amount of Six Million Seven Hundred Twenty-Eight Thousand Dollars
($6,728,000) (the "Loan").   Capitalized terms used herein without definition
have the meanings given to them in the Loan Agreement.

          B.  The Loan is secured by a Deed of Trust, Assignment of Rents and
Leases, Security Agreement and Fixture Filing, dated September 28, 1999,
executed by Borrower as trustor for the benefit of Bank as beneficiary (the
"Deed of Trust").  The Deed of Trust encumbers certain real property located in
Lyon County, Nevada, as more particularly described therein (the "Property").

          C.  Trex Company, Inc., a Delaware corporation  ("Guarantor") has
guarantied Borrower's obligations to Bank, in accordance with a Payment Guaranty
(the "Guaranty") dated as of September 28, 1999.

          D.  The Loan is evidenced in part by a Promissory Note Secured by Deed
of Trust dated September 28, 1999 in the amount of Six Million Seven Hundred
Twenty-Eight Thousand Dollars ($6,728,000) (the "Note").

          E.  As used here, the terms "Loan Documents" means the Loan Agreement,
the Deed of Trust, this Agreement, the Note and any other documents executed in
connection with the Loan, including which evidence, guaranty, secure or modify
the Loan, as any or all of them may have been amended to date. This Agreement is
a Loan Document.

          G.  Borrower and Bank now wish the Loan as set forth below.

                                   Agreement
                                   ---------

          Therefore, Borrower and Bank agree as follows:

          1.  Recitals. The recitals set forth above in the Factual Background
              --------
are true, accurate and correct.
<PAGE>

          2.  Reaffirmation of Loan.  Borrower reaffirms all of its obligations
              ---------------------
under the Loan Documents, and Borrower acknowledges that it has no claims,
offset or defenses with respect to the payment of sums due under any Loan
Document.

          3.  Modification of Loan Documents.  The Loan Documents are hereby
              ------------------------------
amended as follows:

              (a) The first sentence of Section 2.11 of the Loan Agreement (the
              section entitled Consolidated Debt to Consolidated Capitalization)
                               -------------------------------------------------
              is deleted and replaced with the following:

              "The Borrower and any of its subsidiaries (but excluding its
              parent), on a consolidated basis as reported in its public
              filings, shall not at any time during any four (4) fiscal
              quarters, permit its ratio of Total Consolidated Debt to Total
              Consolidated Capitalization to exceed 0.60 to 1.0."

              (b) Except as hereby amended, the Loan Documents shall remain in
              full force and effect.

          4.  Conditions Precedent  Before this Agreement becomes effective and
              --------------------
any party becomes obligated under it, all of the following conditions shall have
been satisfied at Borrower's sole cost and expense in a manner acceptable to
Bank in the exercise of Bank's sole judgment:

              (a) Bank shall have received fully executed and, where
              appropriate, acknowledged originals of this Agreement, the
              attached consent signed by the guarantors, and any other documents
              which Bank may require or request in accordance with this
              Agreement or the other Loan Documents.

              (b) Bank shall have received reimbursement, in immediately
              available funds of all costs and expenses incurred by Bank in
              connection with this Agreement, including charges for the title
              insurance, recording, filing and escrow charges, fees for
              appraisal services, and legal fees and expenses of Bank's counsel.
              Such costs and expenses may include the actual costs or services
              for Bank's in-house staffs, such as legal and appraisal services.

          5.  Borrower's Representation and Warranties. Borrower represents and
              ----------------------------------------
warrants to Bank as follows:

              (a) Loan Document. All representations and warranties made and
                  -------------
              given by Borrower in the Loan Documents are true, accurate and
              correct.

                                      -2-
<PAGE>

             (b) No Default. No Default has occurred and is continuing under the
                 ----------
             Loan or any of the Loan Documents, and no event has occurred and is
             continuing which, with notice or the passage of time or both, would
             be a Default.

             (c) Property.  Borrower continues to lawfully possess and hold fee
                 --------
             simple title to all of the Property which is real property, and the
             Deed of Trust is a first and prior lien on that property. Borrower
             owns all of the Property which is personal property free and clear
             of any reservations of title and conditional sales contracts, and
             also of any security interests other than the Deed of Trust, which
             is a first and prior lien on such property. There is no financing
             statement affecting any Property on file in any public office
             except for financing statements in favor of Bank.

             (d) Borrowing Entity.  Borrower is a limited liability company
                 ----------------
             which is duly organized and validly existing under the laws of the
             State of Delaware.  There have been no changes in the organization,
             composition, ownership structure or formation documents of Borrower
             since the inception of the Loan.

          6.  Incorporation.  Agreement shall form a part of each Loan Document,
              -------------
and all references to a given Loan Document shall mean that document as hereby
modified

          7.  No Prejudice; Reservation of Rights.  This Agreement shall not
              -----------------------------------
prejudice any rights or remedies of Bank under the Loan Documents. Bank
reserves, without limitation, all rights which it has against any indemnitor,
guarantor, or endorser of the Loan.

          8.  No Impairment.  Except as specifically hereby amended, the Loan
              -------------
Documents shall each remain unaffected by this Agreement and all such documents
shall remain in final force and effect. Nothing in this Agreement shall impair
the lien of the Deed of Trust, which as hereby amended shall remain one deed of
trust with one power of sale creating a first lien encumbering the Property.

          9.  Purpose and Effect of Bank's Approval. Bank's approval of any
              -------------------------------------
matter in connection with the Loan shall be for the sole purpose of protecting
Bank's security and rights. No such approval shall result in a waiver of any
default of Borrower. In no event shall Bank's approval be a representation of
any kind with regard to the matter being approved.

          10.  Disclosure to Title Company.  Without notice to or the consent of
               ---------------------------
Borrower, Bank may disclose to any title insurance company which insures any

                                      -3-
<PAGE>

interest of Bank under the Deed of Trust (whether as primary insurer coinsurer
or reinsurer) any information, data or material in Bank's possession relating to
Borrower, the Loan or the Property.

          11.  Integration.  The Loan Documents, including this Agreement and
               -----------
the other documents required to be delivered to Bank in connection with this
Agreement:  (a) constitute integrated Loan Documents; (b) supersede all oral
negotiations and prior and other writings with respect to their subject matter
and (c) are intended by the parties as the final expression of the agreement
with respect to the terms and conditions set forth in those documents and as the
complete and exclusive statement of the terms agreed to by the parties. If there
is any conflict between the terms conditions and provisions of this Agreement
and those of any other agreement or instrument including any of the other Loan
Documents, the terms, conditions, and provisions of this Agreement shall
prevail.

          12.  Miscellaneous.  This Agreement and any attached consents or
               -------------
exhibits requiring signatures may be executed in counterparts, and all
counterparts shall constitute but one and the same document. If any court of
competent jurisdiction determines any provision of this Agreement or any of the
other Loan Documents to be invalid, illegal or unenforceable that portion shall
be deemed severed from the rest which shall remain in full force and effect as
though the invalid illegal or nonenforceable portion had never been a part of
the Loan Documents.  This Agreement shall be governed by the laws of the State
of Nevada without regard to the choice of law rules of that State. As used here,
the word "include(s)" means "Include(s) without limitation", and the word
"including" means "including; but not limited to."

Trex Company, LLC,                              BANK OF AMERICA, N.A.
a Delaware Limited Liability Company

  By: /s/ Robert G. Matheny, President      By: /s/ Mark McVeigh
      --------------------------------          --------------------------------
      Print Name and Title                      Mark McVeigh, Vice President

                                      -4-
<PAGE>

GUARANTOR'S CONSENT

The undersigned Guarantor hereby consent to the terms, conditions and provisions
of the foregoing Loan Modification Agreement and the transactions contemplated
by it.  Guarantor hereby reaffirms the full force and effectiveness of its
Payment Guaranty dated September 28, 1999.

TREX COMPANY, INC.,
a Delaware corporation

By:     /s/ Robert G. Matheny
     --------------------------
        President
     --------------------------
     Print Name and Title

                                      -5-

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