<PAGE>
                                                                    EXHIBIT 2.12




                            SHAREHOLDERS' AGREEMENT

                                     AMONG

                           ALLIS-CHALMERS CORPORATION
                           (A DELAWARE CORPORATION),

                                      AND

         THE SHAREHOLDERS AND WARRANTHOLDER WHO ARE SIGNATORIES HERETO

                                FEBRUARY 1, 2002


<PAGE>
                                                                    EXHIBIT 2.12

                             SHAREHOLDERS' AGREEMENT

        THIS SHAREHOLDERS' AGREEMENT, dated as of February 1, 2002 (the
"Agreement"), is by and among MUNAWAR H. HIDAYATALLAH, ENERGY SPECTRUM PARTNERS,
LP, a Delaware limited partnership ("ESP") (collectively, the "Shareholders"),
ALLIS-CHALMERS CORPORATION, a Delaware corporation (the "Company"), and WELLS
FARGO ENERGY CAPITAL, INC., a Texas corporation (the "Warrantholder").

                              W I T N E S S E T H:

        WHEREAS, the Shareholders are the record and beneficial owner of the
number of issued and outstanding shares of Common Stock, par value $0.15 per
share, of the Company ("Common Stock") listed opposite each such shareholder's
name on the signature page hereto;

        WHEREAS, the Company and Warrantholder have agreed to cancel that
certain Warrant, dated February 6, 2001, to purchase 1,350,000 Shares of the
common stock, par value $0.01 per share, of Mountain Compressed Air, Inc., a
Texas corporation and wholly-owned subsidiary of the Company, held by
Warrantholder (the "Cancellation");

        WHEREAS, the Warrantholder has agreed to arrange for or to lend an
aggregate principal amount of $3,000,000 to the Company pursuant that certain
Credit Agreement, dated as of even date herewith, between the Company and the
Warrantholder (the "Loan Agreement");

        WHEREAS, in connection with the Cancellation and the transactions
contemplated by the Loan Agreement, the Company has agreed to issue to
Warrantholder, in accordance with that certain Warrant Purchase Agreement, dated
as of even date herewith ("Warrant Purchase Agreement"), Warrants to purchase
1,500,000 shares of Common Stock (the "Warrants");

        WHEREAS, the Company and the Shareholders have agreed to enter into this
Agreement to provide Warrantholder with certain rights related to its ownership
of the Warrants; and

        WHEREAS, capitalized terms not otherwise defined in this Agreement shall
have the respective meanings assigned to such terms in the Warrant Purchase
Agreement or, in the event such term is not defined in the Warrant Purchase
Agreement, in Article VII of the Warrants.

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

                                   ARTICLE I.
                                TAG-ALONG RIGHTS

        SECTION 1.1. TAG-ALONG RIGHTS. This Section 1.1 shall apply to a
Transfer (each a "Tag-Along Transfer" and, together, "Tag-Along Transfers") by
either or both of the Shareholders of any number of shares of Common Stock or
Other Securities owned of record or beneficially by either of such Shareholders
(each a "Seller" and, together, the "Sellers"). No Shareholder shall engage in
any Tag-Along Transfer without complying with the terms and conditions set forth
in this Section 1.1; provided, that the requirements of this Section 1.1 shall


<PAGE>

not apply to any Transfer pursuant to, or consummated through, an effective
registration statement filed pursuant to the Securities Act of 1933, as amended,
with respect to such sale.

        (a) If any Shareholder (a "Tag-Along Initiator") desires to engage in a
Tag-Along Transfer, it shall give not less than twenty (20) days' prior written
notice of such intended Transfer to Warrantholder (for purposes of this Section
1.1, the "Tag-Along Offeree") and to the Company. Such notice (the "Tag-Along
Notice") shall set forth the terms and conditions of such proposed Transfer,
including the name of the proposed transferee (the "Transferee"), the number of
shares of Common Stock or Other Securities proposed to be transferred by the
Tag-Along Initiator, the purchase price per share proposed to be paid therefor
and the payment terms and type of transfer to be effectuated. Within ten (10)
days after delivery of the Tag-Along Notice by the Tag-Along Initiator (the
"Tag-Along Acceptance Period") to the Tag-Along Offeree and to the Company, the
Tag-Along Offeree shall, by written notice (the "Offeree Notice") to the
Tag-Along Initiator and the Company, have the opportunity and right to sell to
such Transferee in such proposed Transfer (upon the same terms and conditions as
the Tag-Along Initiator) up to that number of shares of Common Stock or Other
Securities owned by the Tag-Along Offeree as shall be determined under Section
1.1(c). The failure of the Tag-Along Offeree to deliver an Offeree Notice to the
Tag-Along Initiator within the Tag-Along Acceptance Period shall be deemed to be
an automatic refusal of the Tag-Along Offer.

        (b) At the closing of any proposed Transfer in respect of which a
Tag-Along Notice has been delivered, the Tag-Along Initiator together with the
Tag-Along Offeree, if it has elected to sell shares of Common Stock or Other
Securities, shall deliver, free and clear of all liens, to the proposed
Transferee certificates evidencing the shares of Common Stock or Other
Securities to be sold thereto duly endorsed with transfer powers and shall
receive in exchange therefor the consideration to be paid or delivered by the
proposed Transferee in respect of such shares of Common Stock or Other
Securities as described in the Tag-Along Notice. In connection with the closing,
the Tag-Along Offeree shall execute such investor representation and other
related documents as the Transferee may reasonably request.

        (c) The maximum number of shares of Common Stock or Other Securities
that the Tag-Along Offeree may cause the Transferee to purchase pursuant to this
Section 1.1 shall equal the following:

               (i) if Common Stock is being transferred in the Tag-Along
Transfer, the number of shares of Common Stock set forth in the Tag-Along Notice
multiplied by a fraction, the numerator of which is the number of shares of
Common Stock owned by the Tag-Along Offeree immediately prior to the date of the
consummation of the Tag-Along Transfer (the "Sale Date"), and the denominator of
which is the sum of the number of shares of Common Stock owned by the Tag-Along
Offeree plus the number of shares of Common Stock owned by the Seller(s); and

               (ii) if Other Securities are being transferred in the Tag-Along
Transfer, the number of shares of Other Securities set forth in the Tag-Along
Notice multiplied by a fraction, the numerator of which is the number of shares
of Other Securities owned by the Tag-Along Offeree immediately prior to the Sale
Date, and the denominator is the sum of the number of


                                                                          Page 2

<PAGE>

shares of Other Securities owned by the Tag-Along Offeree plus the number of
shares of Other Securities owned by the Seller(s).

        For purposes of computing the number of shares of Common Stock or Other
Securities owned by the Tag-Along Offeree, as of any date, the Tag-Along Offeree
will be deemed to own the sum of the following (without duplication): the number
of shares of Common Stock or Other Securities beneficially owned on such date
plus the number of shares of Common Stock or Other Securities the Tag-Along
Offeree would be entitled to receive upon exercise of any Warrants owned on such
date.

        (d) The purchase price (the "Purchase Price") for shares of Common Stock
or Other Securities transferred under this Section 1.1 shall equal the average
price per share specified in the Tag-Along Notice, and shall include the amount
of cash, the market value of marketable securities, the amount and type of any
Other Securities and consideration for non-competition covenants and payments
pursuant to employment or consulting agreements where the value of the services
to be rendered as reasonably and fairly determined in good faith by the Board of
Directors of the Company does not substantially equal the value of the
consideration paid.

        SECTION 1.2. PURCHASE OF WARRANT. In lieu of causing the Transferee to
purchase Common Stock or Other Securities, the Warrantholder may cause the
Transferee to purchase Warrants convertible into all or a portion of the number
of shares of Common Stock or Other Securities that the Transferee is obligated
to purchase under Section 1.1. In order to cause the Transferee to purchase
Warrants hereunder, the Warrantholder shall specify in the Offeree Notice, in
addition to the other information required in such Offeree Notice, that it is
electing to transfer Warrants to the Transferee, and the number of shares of
Common Stock or Other Securities represented by such Warrants. At the Sale Date,
the Warrantholder will deliver the Warrant to the Transferee duly endorsed for
transfer without any lien, claim, encumbrance, pledge or security interest and
the Transferee will pay the Purchase Price for the Common Stock or Other
Securities represented by such Warrant, reduced by the exercise price of such
Warrant.

        SECTION 1.3. ONGOING RIGHTS. The exercise or non-exercise of the
Warrantholder's right in one or more sales of shares of Common Stock or Other
Securities by a Seller shall not adversely affect the ability of the
Warrantholder to exercise any of its rights, powers or privileges under this
Agreement in the future.

                                   ARTICLE II.
                              PROHIBITED TRANSFERS

        SECTION 2.1. TREATMENT OF PROHIBITED TRANSFERS. In the event any
Shareholder should sell any Common Stock or Other Securities in contravention of
this Agreement (a "Prohibited Transfer"), the Warrantholder, in addition to such
other remedies as may be available at law, in equity or hereunder, shall have
the right to receive the Purchase Price in the same manner as the Warrantholder
otherwise would have been entitled under this Agreement. For purposes of this
Section 2.1, the Seller(s) shall pay to the Warrantholder such Purchase Price
within thirty (30) days after the later of (i) the date on which the
Warrantholder received notice from the Seller(s) of the Prohibited Transfer and
(ii) the date the Warrantholder otherwise became aware of the Prohibited
Transfer. Notwithstanding the foregoing, any transfer of shares,


                                                                          Page 3

<PAGE>

or purported or attempted transfer to be effected, not in accordance with the
terms and conditions of this Agreement, shall be voidable by the Company at the
option of the Warrantholder; provided, however, any such transfer or purported
or attempted transfer or any such voidance by the Company shall not affect the
obligation of the Transferee to pay the Purchase Price to the Warrantholder in
accordance with Article I. In the event the Company receives notice from the
Seller(s) of a Prohibited Transfer or otherwise becomes aware of a Prohibited
Transfer, the Company shall promptly notify the Warrantholder. The Company
agrees it will not effect any such transfer nor will it treat any alleged
transferee as the registered owner of such shares of Common Stock or Other
Securities without affording to the Warrantholder notice and opportunity to
exercise its rights pursuant to Article I or Article II.

                                  ARTICLE III.
                                   (RESERVED)

                                   ARTICLE IV.
                              LEGENDED CERTIFICATES

        A copy of this Agreement shall be filed with the Secretary of the
Company and kept with the records of the Company. Each certificate representing
shares of the Common Stock or Other Securities now or hereafter owned by any
Shareholder (and all certificates issued in exchange therefore or substitution
thereof) shall be endorsed with the following legend:

               THE SALE OR TRANSFER OF THE SECURITIES REPRESENTED BY THIS
        CERTIFICATE IS SUBJECT TO THE TERMS AND CONDITIONS OF A SHAREHOLDERS
        AGREEMENT, DATED AS OF FEBRUARY 1, 2002, AMONG THE STOCKHOLDERS AND
        WARRANTHOLDERS NAMED ON THE SIGNATURE PAGES THERETO, AND THE COMPANY. A
        COPY OF SUCH AGREEMENT IS ON FILE AT THE OFFICE OF THE COMPANY. THE
        COMPANY SHALL FURNISH A COPY OF SUCH AGREEMENT TO THE RECORD HOLDER
        HEREOF WITHOUT CHARGE UPON WRITTEN REQUEST.

                                   ARTICLE V.
                              TERMINATION OF RIGHTS

        The term of this Agreement shall continue until such time as (a) the
Warrantholder shall no longer be the registered holder of any Warrants issued
pursuant to the Warrant Purchase Agreement, (b) the Warrantholder shall no
longer be the registered owner of any Common Stock or Other Securities issued
upon exercise of the Warrants, or (c) all shares of Common Stock or Other
Securities held by the Warrantholder may immediately be sold under Rule 144 of
the Securities Act of 1933, as amended.

                                   ARTICLE VI.
                                  MISCELLANEOUS

        SECTION 6.1. SPECIFIC PERFORMANCE. The parties acknowledge and agree
that any breach of the agreements and covenants contained in this Agreement
would cause irreparable injury to the Warrantholder, the Shareholders or the
Company for which the Warrantholder, the


                                                                          Page 4

<PAGE>

Shareholders or the Company would have no adequate remedy at law. In addition to
any other remedy that the Warrantholder, the Shareholders or the Company may be
entitled to, the parties agree that temporary and permanent injunctive relief
and other equitable relief and specific performance may be granted without proof
of actual damages or inadequacy of legal remedy in any proceeding that may be
brought to enforce any of the provisions of this Agreement.

        SECTION 6.2. PAYMENT OF COSTS AND EXPENSES. Whether or not the
transactions contemplated by this Agreement are consummated, the Company will
pay all costs and expenses in connection with the negotiation, preparation and
performance of, and compliance with the terms of this Agreement.

        SECTION 6.3. FURTHER ASSURANCES. Each party agrees to use its best
efforts to take, or cause to be taken, and to do, or cause to be done, all
things that may be necessary or appropriate to consummate and make effective the
transactions contemplated by this Agreement.

        SECTION 6.4. AMENDMENT. This Agreement may not be modified or amended
except by a written instrument executed by or on behalf of each of the parties
hereto.

        SECTION 6.5. WAIVERS. The observance of any term of this Agreement may
be waived (either generally or in a particular instance and either retroactively
or prospectively) by the party entitled to enforce such term, but such waiver
shall be effective only if in a writing signed by the party or parties against
which such waiver is to be asserted. Unless otherwise expressly provided herein,
no delay or omission on the part of any party hereto in exercising any right,
power or privilege hereunder shall operate as a waiver thereof, nor shall any
waiver or omission on the part of any party hereto of any right, power or
privilege hereunder operate as a waiver of any other right, power or privilege
hereunder nor shall any single or partial exercise of any right, power or
privilege hereunder preclude any other or further exercise thereof or the
exercise of any other right, power or privilege hereunder. All remedies, either
under this Agreement or by law or otherwise afforded to any party, shall be
cumulative and not alternative.

        SECTION 6.6. ENTIRE AGREEMENT. This Agreement and the documents
expressly referred to or incorporated herein constitute the entire agreement
among the parties hereto with respect to the matters covered hereby, and any
other prior or contemporaneous oral or written understandings or agreements with
respect to the matters covered hereby are expressly superseded by this
Agreement.

        SECTION 6.7. SEVERABILITY. If any provision of this Agreement, or the
application of such provision to any person or circumstance, shall be judicially
declared to be invalid, unenforceable or void, such decision will not have the
effect of invalidating or voiding the remainder of this Agreement or affect the
application of such provision to other persons or circumstances, and the parties
hereto agree that the part or parts of this Agreement so held to be invalid,
unenforceable or void will be deemed to have been stricken herefrom and the
remainder of this Agreement will have the same force and effect as if such part
or parts had never been included herein. Any such finding or invalidity or
unenforceability shall not prevent the enforcement of such provision in any
other jurisdiction to the maximum extent permitted by applicable law.


                                                                          Page 5

<PAGE>

        SECTION 6.8. NOTICES. Unless otherwise expressly provided herein, all
notices, requests, demands, consents, waivers, instructions, approvals and other
communications hereunder shall be in writing and shall be deemed to have been
duly given if personally delivered to or mailed, certified mail, return receipt
requested, first-class postage paid, addressed as follows:

        IF TO MUNAWAR H. HIDAYATALLAH, TO:

        7660 Woodway, Suite 200
        Houston, Texas  77063

        IF TO ENERGY SPECTRUM PARTNERS, LP, TO:

        5956 Sherry Lane, Suite 900
        Dallas, Texas 75225
        Attn:  Thomas O. Whitener, Jr.

        WITH A COPY (WHICH SHALL NOT CONSTITUTE EFFECTIVE NOTICE UNDER THIS
        SECTION 5.8) TO:

        Jackson Walker L.L.P.
        901 Main Street, Suite 6000
        Dallas, Texas 75202-3797
        Attn:  Frank P. McEachern, Esq.

        IF TO THE COMPANY, TO:

        7660 Woodway, Suite 200
        Houston, Texas  77063
        Attn:  Munawar H. Hidayatallah, Chairman and CEO

        WITH A COPY (WHICH SHALL NOT CONSTITUTE EFFECTIVE NOTICE UNDER THIS
        SECTION 5.8) TO:

        Wilson, Cribbs, Goren & Flaum
        2200 Lyric Centre
        440 Louisiana
        Houston, Texas  77002
        Attention:  Theodore F. Pound III

        IF TO THE WARRANTHOLDER, TO:

        1000 Louisiana, Suite 600
        Houston, Texas  77002
        Attn:  Gary Milavec, Senior Vice President


                                                                          Page 6

<PAGE>

        WITH A COPY (WHICH SHALL NOT CONSTITUTE EFFECTIVE NOTICE UNDER THIS
        SECTION 5.8) TO:

        Haynes and Boone, LLP
        1000 Louisiana, Suite 4300
        Houston, Texas  77002
        Attention:  Buddy Clark, Esq.

or to such other address or to such other individuals as any party shall have
last designated by notice to the other party. All notices and other
communications given to any party in accordance with the provisions of this
Agreement shall be deemed to have been given when delivered or sent to the
intended recipient thereof in accordance with the provisions of Section 5.8.

        SECTION 6.9. GOVERNING LAW. THIS AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND THE RIGHTS OF THE PARTIES SHALL BE GOVERNED BY, THE LAWS OF
THE STATE OF TEXAS WITHOUT REGARD TO THE PRINCIPLES OF CONFLICT OF LAWS.

        SECTION 6.10. SUCCESSORS AND ASSIGNS. Unless otherwise expressly
provided herein, this Agreement shall be binding upon and inure to the benefit
of the parties hereto, and their respective legal representatives, successors
and permitted assigns. Unless otherwise expressly provided herein, neither this
Agreement nor any of the rights, interests or obligations hereunder may be
assigned, by operation of law or otherwise, by any party hereto without the
prior written consent of all other parties.

        SECTION 6.11. HEADINGS. The Article and Section headings in this
Agreement are for convenience of reference only and shall not be deemed to alter
or affect the meaning or interpretation of any provisions hereof.

        SECTION 6.12. COUNTERPARTS. This Agreement may be executed in two or
more counterparts, each of which shall be deemed to be an original and all of
which together shall be deemed to be one and the same instrument.

  [THE REMAINDER OF THIS PAGE INTENTIONALLY BLANK. SIGNATURE PAGES TO FOLLOW.]


                                                                          Page 7

<PAGE>

        IN WITNESS WHEREOF, this Agreement has been duly executed and delivered
as of the date first above written.

                                      ALLIS -- CHALMERS CORPORATION


                                By:   /s/ Munawar H. Hidayatallah
                                      ------------------------------------------
                                      Munawar H. Hidayatallah, Chairman
                                      and Chief Executive Officer

NUMBER OF SECURITIES OWNED:



                                      /s/ Munawar H. Hidayatallah
                                      ------------------------------------------
_______ shares of Common Stock        MUNAWAR H. HIDAYATALLAH


_______ shares of Common Stock        ENERGY SPECTRUM PARTNERS, LP

                                      By:  Energy Spectrum Capital, LP
                                              its General Partner

                                           By:  Energy Spectrum, LLC
                                                its General Partner


                                                By: /s/ Thomas O. Whitener, Jr.
                                                    Thomas O. Whitener, Jr.
                                                    Chief Operating Officer

Warrants to purchase 1,500,000        WELLS FARGO ENERGY CAPITAL, INC.
shares of Common Stock


                                By:   /s/ Gary Milavec
                                      ------------------------------------------
                                      Gary Milavec, Senior Vice President



                                                                          Page 8