<PAGE>

                                   EXHIBIT 4.2

<PAGE>

            FIFTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT

         This Fifth Amendment to Amended and Restated Credit Agreement (the
"AMENDMENT") dated as of December 21, 1999 among Atchison Casting Corporation
(the "BORROWER"), the Banks, and Harris Trust and Savings Bank, as Agent;

                              W I T N E S S E T H:

         WHEREAS, the Borrower, Guarantors, Banks and Harris Trust and Savings
Bank, as Agent, have heretofore executed and delivered an Amended and Restated
Credit Agreement dated as of April 3, 1998 (as amended through the Fourth
Amendment thereto dated November 5, 1999, the "CREDIT AGREEMENT"); and

         WHEREAS, the parties hereto desire to amend the Credit Agreement as
provided herein;

         NOW, THEREFORE, for good and valuable consideration the receipt and
sufficiency of which is hereby acknowledged, the parties hereto agree that the
Credit Agreement shall be and hereby is amended as follows:

          1. The definition of "FIXED CHARGES" appearing in Section 4.1 of the
Credit Agreement is hereby amended in its entirety and as so amended shall read
as follows:

                           "FIXED CHARGES" means, as applied to any Person for
                  any period, the sum of (a) Interest Expense of such Person for
                  such period, PLUS (b) the aggregate amount of Current
                  Maturities required to be made by the Borrower and its
                  Subsidiaries PLUS (c) 15% of the aggregate principal amount of
                  Revolving Loans outstanding on the last day of such period;
                  provided that if the Borrower obtains a commitment from
                  General Electric Capital Corporation in form and substance
                  acceptable to the Required Banks by no later than December 22,
                  1999 to extend to the Borrower the GE Financing (as
                  hereinafter defined) on or prior to January 31, 2000, clause
                  (c) shall only be effective from and after July 1, 2000;
                  PROVIDED FURTHER that if GE Capital Corporation does not
                  advance the GE Financing on or prior to January 31, 2000,
                  clause (c) above shall be effective for all calculations at
                  all times after October 1, 1999.

         2. Section 1.14 to the Credit Agreement is hereby amended in its
entirety to read as follows:

                           SECTION 1.14. INCREASE IN COMMITMENTS. On or prior to
                  January 31, 2000, the Borrower shall have the right to
                  increase the Commitments up to an additional $10,000,000 (in a
                  minimum amount of $5,000,000 and integral multiples of
                  $1,000,000 in excess thereof) on a percentage basis for each
                  of the Banks in

<PAGE>

                  accordance with the amount of their Temporary Commitment
                  Percentage upon three Business Days' prior written notice to
                  the Agent PROVIDED THAT: (i) the Borrower may exercise its
                  rights to increase the Commitments pursuant to this Section
                  1.14 only one time, (ii) no Default or Event of Default shall
                  have occurred and be continuing on the date of such increase
                  or would result from such increase, (iii) on the date of such
                  increase the Borrower shall have repaid in full the
                  outstanding Term Loans from the proceeds of the GE Financing
                  and other funds available to the Borrower, and (iv) the
                  increase in Commitments to become effective on such date shall
                  be in an aggregate amount not to exceed $10,000,000. Upon the
                  satisfaction of the foregoing provisions, the Commitments
                  shall, without any further action on the part of the Borrower
                  or any Bank, be deemed amended to reflect the increase as
                  provided in this Section 1.14. Any increase in the Commitments
                  pursuant to this Section 1.14 shall, notwithstanding anything
                  in the Credit Agreement to the contrary, automatically
                  terminate on April 30, 2000. Notwithstanding the provisions of
                  Section 3.1 hereof or any other provision of the Credit
                  Agreement to the contrary, if and so long as no Event of
                  Default under Section 8.1(a) has occurred and is continuing
                  and the aggregate principal amount oustanding under the Credit
                  Agreement exceeds $70,000,000, each payment of the principal
                  amount of any Loan or unreimbursed drawing on a Letter of
                  Credit shall first be applied to repay the Banks that have
                  increased their Commitments pursuant to this Section 1.14
                  ratably that portion (if any) of the outstanding Loans and
                  unpaid reimbursement obligations on Letters of Credit that
                  exceeds $70,000,000. Otherwise, all payments shall be applied
                  PRO RATA in accordance with the provisions of Section 3.1. As
                  used in this Section 1.14 "TEMPORARY COMMITMENT PERCENTAGE"
                  for each Bank shall mean the percentage set forth opposite
                  such Bank's name below:
<TABLE>
<S>                                                                             <C>

                         Harris Trust and Savings Bank                               38.63636364%
                         Commerce Bank, N.A.                                        13. 63636364%
                         Mercantile Bank                                            13. 63636364%
                         KeyBank National Association                                       0.00%
                         Comerica Bank                                                9.09090909%
                         Hibernia National Bank                                       9.09090909%
                         National Westminster Bank Plc                                9.09090909%
                         Norwest Bank Minnesota, N.A.                                 6.81818181%
</TABLE>

          3. Section 7.16 of the Credit Agreement is hereby amended by: (i)
re-lettering subclause (c) as new subclause "(d)" and (ii) adding new subclause
(c) as follows:

                           (c) indebtedness for borrowed money of the Borrower
                  in an aggregate principal amount anytime outstanding not
                  exceeding $35,000,000 advanced by General Electric Capital


                                      -2-
<PAGE>

                  Corporation or its assignees pursuant to documentation
                  acceptable to the Required Banks (the "GE FINANCING").

          4. Section 7.9 of the Credit Agreement is hereby amended by: (a)
re-lettering subclause (g) thereof as new subclause "(h)" and (ii) inserting new
subclause (g) as follows:

                           (g) Liens upon certain fixed assets, real estate,
                  equipment, furniture and fixtures of the Borrower as approved
                  by the Required Banks located in Atchison, Kansas and St.
                  Joseph, Missouri securing the GE Financing.

          5. Schedule 5.6(a) to the Credit Agreement is hereby amended in its
entirety to read as Schedule 5.6(a) attached to this Amendment.

          6. Notwithstanding paragraph 8 of the Fourth Amendment to the Credit
Agreement, the Banks agree that: (i) the Borrower need only deliver as
collateral non-real estate assets located in the United States or Canada, (ii)
the Banks will not take as collateral certain fixed assets, real estate,
equipment, furniture and fixtures (to be approved by the Required Banks) of the
Borrower located in Atchison, Kansas and St. Joseph, Missouri to the extent such
assets are pledged to secure the GE Financing and the Term Loans have been
repaid with the proceeds of the GE Financing and other funds available to the
Borrower, and (iii) the Borrower will deliver security interests in such real
estate of the Borrower and its Subsidiaries located in the United States or
Canada as the Required Banks may request from time to time other than the real
estate of the Borrower located in Atchison, Kansas and St. Joseph, Missouri
commonly known as the Atchison Foundry and St. Joseph Machine Shop. All other
assets of the Borrower and any Subsidiary of the Borrower would remain subject
to the negative pledge contained in Section 7.16 of the Credit Agreement.

          7. The Borrower represents and warrants to each Bank and the Agent
that (a) each of the representations and warranties set forth in Section 5 of
the Credit Agreement (as updated pursuant to this Amendment) is true and correct
on and as of the date of this Amendment as if made on and as of the date hereof
and as if each reference therein to the Credit Agreement referred to the Credit
Agreement as amended hereby; (b) after giving effect to this Amendment, no
Default and no Event of Default has occurred and is continuing; and (c) without
limiting the effect of the foregoing, the Borrower's execution, delivery and
performance of this Amendment have been duly authorized, and this Amendment has
been executed and delivered by duly authorized officers of the Borrower.

          8. This Amendment shall become effective when the Borrower, the
Required Banks, and the Agent shall have executed and delivered this Amendment
and the Guarantors shall have executed the consent attached hereto.

         This Amendment may be executed in any number of counterparts and by
different parties hereto on separate counterpart signature pages, each of which
when so executed shall be an original but all of which shall constitute one and
the same instrument. Except as specifically amended and modified hereby, all of
the terms and conditions of the Credit Agreement and the


                                      -3-
<PAGE>

other Credit Documents shall remain unchanged and in full force and effect. All
references to the Credit Agreement in any document shall be deemed to be
references to the Credit Agreement as amended hereby. All capitalized terms used
herein without definition shall have the same meaning herein as they have in the
Credit Agreement. This Amendment shall be construed and governed by and in
accordance with the internal laws of the State of Illinois.


                                      -4-
<PAGE>

         Dated as of the date first above written.


                               ATCHISON CASTING CORPORATION


                               By:  /s/ Kevin T. McDeremd
                                  -------------------------------------------
                               Title: V.P. & Treasurer
                                     ----------------------------------------

                               HARRIS TRUST AND SAVINGS BANK, in its individual
                                  capacity as a Bank and as Agent


                               By:  /s/ Len E. Meyer
                                  -------------------------------------------
                               Title: Vice President
                                     ----------------------------------------

                               COMMERCE BANK, N.A.


                               By:  /s/ Dennis R. Block
                                  -------------------------------------------
                               Title: Senior Vice President
                                     ----------------------------------------

                               MERCANTILE BANK


                               By:  /s/ Barry P. Sullivan
                                  -------------------------------------------
                               Title:  Vice President
                                     ----------------------------------------

                               KEY BANK NATIONAL ASSOCIATION


                               By:  /s/ Lawrence A. Mack
                                  -------------------------------------------
                               Title: Senior Vice President
                                     ----------------------------------------


                                      -5-
<PAGE>

                               COMERICA BANK


                               By:  /s/ Jeffrey E. Peck
                                  -------------------------------------------
                               Title: Vice President
                                     ----------------------------------------


                               HIBERNIA NATIONAL BANK


                               By:  /s/ Troy J. Villafarro
                                  -------------------------------------------
                               Title: Senior Vice President
                                     ----------------------------------------


                               NATIONAL WESTMINSTER BANK PLC

                               Nassau Branch


                               By: /s/ C. A. Parsons
                                  -------------------------------------------
                               Title: Corporate Director
                                     ----------------------------------------

                               New York Branch


                               By: /s/ C. A. Parsons
                                  -------------------------------------------
                               Title: Corporate Director
                                     ----------------------------------------


                               NORWEST BANK MINNESOTA, N.A.


                               By:  /s/ R. Duncan Sinclair
                                  -------------------------------------------
                               Title: Vice President
                                     ----------------------------------------


                                       -6-