<PAGE>
                                                                   EXHIBIT 10.21


                       FOURTH AMENDMENT TO LOAN AGREEMENT

         This Fourth Amendment to Loan Agreement (the "Amendment"), dated as of
October 15, 2001, is by and between XETEL CORPORATION ("Borrower") and THE CIT
GROUP/BUSINESS CREDIT, INC. ("Lender").

                                    RECITALS:

         A. Borrower and Lender have entered into that certain Loan Agreement
(the "Agreement") dated as of March 31, 2000, as amended by that certain First
Amendment to Loan Agreement dated as of January 16, 2001, by that certain Second
Amendment to Loan Agreement dated as of March 30, 2001, and by that certain
Third Amendment to Loan Agreement dated as of April 30, 2001, pursuant to which
Lender agreed to extend credit to Borrower in form of a loan under the terms and
provisions stated therein.

         B. Borrower and Lender now desire to amend the Agreement as herein set
forth.

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

                                    ARTICLE I

                                   DEFINITIONS

         1.1 Definitions. Capitalized terms used in this Amendment, to the
extent not otherwise defined herein, shall have the same meanings as in the
Agreement, as amended hereby.

                                   ARTICLE II

                   AMENDMENTS TO AGREEMENT AND OTHER COVENANTS

         2.1 Amendment to Section 10.1(a). Effective as of the date hereof,
Section 10.1(a) of the Agreement is hereby amended in its entirety to read as
follows:

                  "(a) Maximum Credit: $19,500,000."

         2.2 Requests, Consent and Agreement. Borrower requests that Lender
permit, for a limited time, Revolving Credit Loans and Letters of Credit to
exceed Gross Availability by up to $2,225,000 (the "Overadvance"). Lender
consents to the existence of such Overadvance from the effective date of this
Amendment through October 29, 2001. Beginning October 29, 2001, the maximum
amount of the permitted Overadvance shall be reduced, so that at the close of
business on October 29, 2001, the maximum amount of the Overadvance shall be
$1,300,000. Thereafter, at the close of business on November 5, 2001, the
maximum amount of the Overadvance shall be $1,200,000, at the close of business
on November 12, 2001, the maximum amount of the Overadvance shall be $700,000,
and at the close of business on November 19, 2001, the maximum amount of the
Overadvance shall be $400,000. At the close of business on November 26, 2001 and
thereafter, no Overadvance shall be permitted. Nothing contained



<PAGE>



herein shall constitute an agreement or consent to the existence of any
overadvance or additional advances exceeding Gross Availability other than the
Overadvance specifically permitted herein.

         2.3 Agreements Regarding Excess Inventory. Borrower and Lender agree
that an amount of certain inventory that is considered "Excess Inventory" shall
be excluded from the definition of Eligible Inventory at the rate of $1,000,000
per week, beginning on November 13, 2001 and continuing on the same day of each
week thereafter. Any inventory that constitutes Excess Inventory and that
becomes ineligible inventory between the effective date of this Amendment and
November 13, 2001 shall reduce the amount of Excess Inventory excluded from the
definition of Eligible Inventory as set forth in the foregoing sentence, up to a
maximum of $1,000,000 per week. "Excess Inventory" shall be defined as inventory
for which no current purchase order or binding forecast has been issued, and
shall be determined at Lender's sole discretion.

         2.4 Turnaround Consultant. Borrower agrees that it will retain a
turnaround consultant acceptable to Lender on terms and conditions satisfactory
to Lender on or before November 5, 2001.

         2.5 Additional Fees. Borrower agrees that if any Overadvance exists on
or after November 6, 2001 through November 26, 2001, an additional amendment fee
of $25,000 shall be due and payable on the first day such Overadvance exists.

                                   ARTICLE III

                         LIMITED WAIVER AND FORBEARANCE

         3.1 Violation of Fixed Charge Coverage Ratio. Borrower has informed
Lender that it expects to violate the Fixed Charge Coverage Ratio set forth in
Sections 6.11 and 10.4(b) of the Agreement for the period ending September 30,
2001. Lender hereby agrees to waive compliance with the Fixed Charge Coverage
Ratio set forth in Sections 6.11 and 10.4(b) and to forbear from exercising its
rights and remedies available under the Loan Documents and at law based upon the
violation of the Fixed Charge Coverage Ratio for the period from October 31,
2001 through November 14, 2001. This limited waiver and forbearance does not
constitute a waiver or forbearance by Lender with respect to any other default
under the Loan Documents not addressed by this Amendment. Lender and Borrower
will endeavor to enter into a forbearance agreement addressing the failure to
comply with Sections 6.11 and 10.4(b) and modifying and/or adding other
financial covenants on or before November 14, 2001.

                                   ARTICLE IV

                              CONDITIONS PRECEDENT

         4.1 Conditions. The effectiveness of this Amendment is subject to the
satisfaction of the following conditions precedent:

                  A. Lender shall have received all of the following, in form
         and substance satisfactory to Lender:



                                       2
<PAGE>



                           1. Amendment. This Amendment duly executed by
                  Borrower;

                           2. Amendment Fee. An amendment fee in the amount of
                  $50,000.00;

                           3. Projections. Cash flow projections in form and
                  substance acceptable to Lender; and

                           4. Additional Information. Such additional documents,
                  instruments and information as Lender or its legal counsel,
                  Winstead Sechrest & Minick P.C., may reasonably request.

                  B. The representations and warranties contained herein and in
         all other Loan Documents, as amended hereby, shall be true and correct
         as of the date hereof as if made on the date hereof, except for
         Sections 5.1, 7.1(h) and 7.1(m) of the Agreement. Borrower acknowledges
         that Lender does not waive any Event of Default resulting from the
         Borrower's inability to represent that such representations and
         warranties are true and correct.

                  C. Other than the conditions resulting in the Overadvance and
         other matters addressed herein, no Event of Default shall have occurred
         and be continuing and no event or condition shall have occurred that
         with the giving of notice or lapse of time or both would be an Event of
         Default.

                  D. All corporate proceedings taken in connection with the
         transactions contemplated by this Amendment and all documents,
         instruments, and other legal matters incident thereto shall be
         satisfactory to Lender and its legal counsel, Winstead Sechrest &
         Minick P.C.

                                    ARTICLE V

                  RATIFICATIONS, REPRESENTATIONS AND WARRANTIES

         5.1 Ratifications. The terms and provisions set forth in this Amendment
shall modify and supersede all inconsistent terms and provisions set forth in
the Agreement and except as expressly modified and superseded by this Amendment,
the terms and provisions of the Agreement are ratified and confirmed and shall
continue in full force and effect. Borrower and Lender agree that the Agreement
as amended hereby shall continue to be legal, valid, binding and enforceable in
accordance with its terms. Borrower also acknowledges and ratifies that it
claims that it is entitled to certain proceeds from its account debtors Tellabs,
Inc., Tellabs Operations, Inc., Salix Technologies, Inc. and LM Ericsson
Telephone Co. or their respective affiliates, successors or assigns. Borrower
further acknowledges and ratifies that it has granted to Lender a security
interest in all accounts, contract rights and general intangibles (including
choses in action) and any proceeds thereof, specifically including any rights to
payment that Borrower has against its account debtors, including Tellabs, Inc.,
Tellabs Operations, Inc., Salix Technologies, Inc. and LM Ericsson Telephone Co.
or any of their respective affiliates, successors or assigns.



                                       3
<PAGE>



         5.2 Representations and Warranties. Borrower hereby represents and
warrants to Lender that (i) the execution, delivery and performance of this
Amendment and any and all other Loan Documents executed and/or delivered in
connection herewith have been authorized by all requisite corporate action on
the part of Borrower and will not violate the articles of incorporation or
bylaws of Borrower, (ii) the representations and warranties contained in the
Agreement, as amended hereby, and any other Loan Document are true and correct
on and as of the date hereof as though made on and as of the date hereof, (iii)
other than the conditions resulting in the Overadvance addressed by this
Amendment, no Event of Default has occurred and is continuing and no event or
condition has occurred that with the giving of notice or lapse of time or both
would be an Event of Default, and (iv) Borrower is in full compliance with all
covenants and agreements contained in the Agreement as amended hereby.

                                   ARTICLE VI

                                  MISCELLANEOUS

         6.1 Survival of Representations and Warranties. All representations and
warranties made in this Amendment or any other Loan Document including any Loan
Document furnished in connection with this Amendment shall survive the execution
and delivery of this Amendment and the other Loan Documents, and no
investigation by Lender or any closing shall affect the representations and
warranties or the right of Lender to rely upon them.

         6.2 Reference to Agreement. Each of the Loan Documents, including the
Agreement and any and all other agreements, documents or instruments now or
hereafter executed and delivered pursuant to the terms hereof or pursuant to the
terms of the Agreement as amended hereby, are hereby amended so that any
reference in such Loan Documents to the Agreement shall mean a reference to the
Agreement as amended hereby.

         6.3 Expenses of Lender. As provided in the Agreement, Borrower agrees
to pay on demand all costs and expenses incurred by Lender in connection with
the preparation, negotiation, and execution of this Amendment and the other Loan
Documents executed pursuant hereto and any and all amendments, modifications,
and supplements thereto, including without limitation the costs and fees of
Lender's legal counsel, and all costs and expenses incurred by Lender in
connection with the enforcement or preservation of any rights under the
Agreement, as amended hereby, or any other Loan Document.

         6.4 Severability. Any provision of this Amendment held by a court of
competent jurisdiction to be invalid or unenforceable shall not impair or
invalidate the remainder of this Amendment and the effect thereof shall be
confined to the provision so held to be invalid or unenforceable.

         6.5 Applicable Law. This Amendment and all other Loan Documents
executed pursuant hereto shall be governed by and construed in accordance with
the laws of the State of New York.

         6.6 Successors and Assigns. This Amendment is binding upon and shall
inure to the benefit of Lender and Borrower and their respective successors and
assigns, except Borrower



                                       4
<PAGE>



may not assign or transfer any of its rights or obligations hereunder without
the prior written consent of Lender.

         6.7 Counterparts. This Amendment may be executed in one or more
counterparts, each of which when so executed shall be deemed to be an original,
but all of which when taken together shall constitute one and the same
instrument.

         6.8 Effect of Waiver. No consent or waiver, express or implied, by
Lender to or for any breach of or deviation from any covenant, condition or duty
by Borrower or Guarantor shall be deemed a consent or waiver to or of any other
breach of the same or any other covenant, condition or duty.

         6.9 Headings. The headings, captions, and arrangements used in this
Amendment are for convenience only and shall not affect the interpretation of
this Amendment.

         6.10 Release and Waiver of Claims. Borrower hereby unconditionally and
irrevocably remises, acquits, and fully and forever releases and discharges
Lender and all respective affiliates and subsidiaries of Lender, its respective
officers, servants, employees, agents, attorneys, principals, directors and
shareholders, and their respective heirs, legal representatives, successors and
assigns (collectively, the "Released Lender Parties") from any and all claims,
demands, causes of action, obligations, remedies, suits, damages and liabilities
(collectively, the "Borrower Claims") of any nature whatsoever, whether now
known, suspected or claimed, whether arising under common law, in equity or
under statute, which Borrower ever had or now has against the Released Lender
Parties which may have arisen at any time on or prior to the date of this
Amendment and which were in any manner related to any of the Loan Documents or
the enforcement or attempted enforcement by Lender of rights, remedies or
recourses related thereto. Borrower covenants and agrees never to commence,
voluntarily aid in any way, prosecute or cause to be commenced or prosecuted
against any of the Released Lender Parties any action or other proceeding based
upon any of the Borrower Claims which may have arisen at any time on or prior to
the date of this Amendment and were in any manner related to any of the Loan
Documents. The agreements of Borrower set forth in this Section 6.10 shall
survive termination of this Amendment.

         6.11 Reservation of Rights. Lender does not waive any Event of Default
which may exist under the Agreement and the Loan Documents. Lender expressly
reserves any and all rights and remedies available under the Agreement and the
other Loan Documents, and execution of this Amendment shall not act as a waiver
of, nor prevent Bank from exercising any right, remedy, or power available to
Lender, including, without limitation, all rights, remedies and powers granted
under the Loan Documents and at law or in equity.

         6.12 ENTIRE AGREEMENT. THIS AMENDMENT AND ALL OTHER INSTRUMENTS,
DOCUMENTS AND AGREEMENTS EXECUTED AND DELIVERED IN CONNECTION WITH THIS
AMENDMENT EMBODY THE FINAL, ENTIRE AGREEMENT AMONG THE PARTIES HERETO AND
SUPERSEDE ANY AND ALL PRIOR COMMITMENTS, AGREEMENTS, REPRESENTATIONS AND
UNDERSTANDINGS, WHETHER WRITTEN OR ORAL, RELATING TO THIS AMENDMENT, AND MAY NOT
BE CONTRADICTED OR VARIED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR SUBSEQUENT
ORAL AGREEMENTS OR DISCUSSIONS OF THE PARTIES HERETO. THERE ARE NO ORAL
AGREEMENTS AMONG THE PARTIES HERETO.



                                       5
<PAGE>



         EXECUTED as of the date first written above.


                                BORROWER:

                                XETEL CORPORATION


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



                                LENDER:

                                THE CIT GROUP/BUSINESS CREDIT, INC.


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





                                       6