<PAGE>

                                                                   EXHIBIT 10.40


                                    GUARANTY

     GUARANTY (this "GUARANTY"), dated as of October 27, 2005, is made by TB
WOOD'S CORPORATION ("Guarantor"), a Delaware corporation.


                              W I T N E S S E T H:

     WHEREAS, pursuant to the terms, and subject to the conditions, of the
Securities Purchase Agreement (the "PURCHASE AGREEMENT"), dated as of October
12, 2005, by and among TB Wood's Incorporated, a Pennsylvania corporation, Plant
Engineering Consultants, LLC, a Tennessee limited liability company, TB Wood's
Enterprises, Inc., a Delaware corporation (collectively, the "BORROWERS"), AEA
Mezzanine Funding LLC ("AEAM FUNDING"), a Delaware limited liability company,
AEA Mezzanine Fund LP ("AEAMF"), a Delaware limited partnership, AEA Mezzanine
(Unleveraged) Fund LP ("AEAUMF" and collectively with AEAM Funding and AEAM, the
"PURCHASERS" and individually, a "PURCHASER"), a Delaware limited partnership,
Guarantor and T.B. Wood's Canada Ltd., an Ontario corporation, (a) AEAM Funding
is purchasing from the Borrowers a Senior Subordinated Promissory Note (the
"AEAM FUNDING NOTE") of the Borrowers in the principal amount of $10,185,086.06;
(b) AEAMF is purchasing from Guarantor a warrant (the "AEAMF WARRANT") to
purchase an aggregate of 118,147 shares of common stock of Guarantor, $.01 par
value per share (the "COMMON STOCK"); and (c) AEAUMF is purchasing from (i) the
Borrowers a Senior Subordinated Promissory Note (the "AEAUMF NOTE" and
collectively with the AEAM Funding Note, the "NOTES" and individually, a "NOTE")
of the Borrowers in the principal amount of $4,814,913.94 and (ii) Guarantor a
warrant (the "AEAUMF WARRANT" and collectively with the AEAMF Warrant, the
"WARRANTS" and individually, a "WARRANT") to purchase an aggregate of 55,853
shares of Common Stock;

     WHEREAS, in order to induce the Purchasers to purchase the Notes and the
Warrants, Guarantor will execute and deliver this Guaranty pursuant to which
Guarantor will guaranty, among other things, payment of all of the Obligations,
as hereinafter defined; and

     WHEREAS, it is of material benefit to Guarantor that the Purchasers
purchase the Notes and the Warrants and provide to Guarantor and the Borrowers
the capital represented thereby.

     Accordingly, Guarantor agrees for the benefit of the Purchasers, as
follows:

     1. CERTAIN TERMS.

          (a) "OBLIGATIONS" means all (i) acts, performances and obligations
when due of the Borrowers under the Notes, (ii) costs and expenses (including,
without limitation, attorneys' fees and disbursements) incurred in connection
with the enforcement of this Guaranty and (iii) Indemnification Obligations.

          (b) "INDEMNIFICATION OBLIGATIONS" means all acts, performances and
obligations when due of the Borrowers under Section 7 of the Purchase Agreement,
including, without limitation, the costs and expenses (including, without
limitation, attorneys' fees and disbursements) incurred in connection with the
enforcement of this Guaranty.

<PAGE>

     2. GUARANTY. Guarantor hereby absolutely, unconditionally and irrevocably
guaranties to each Purchaser the full and punctual payment when due of all
Obligations owed to such Purchaser, whether at stated maturity, by required
prepayment, declaration, acceleration, demand or otherwise, and such guaranty is
not conditional or contingent upon pursuit by any of the Purchasers of any prior
action or proceeding for collection, or for any other remedies any of the
Purchasers may have, against the Borrowers or any other Person.

     3. CONSENT. Guarantor hereby consents and agrees that the whole or any part
of the security now or hereafter held for any Obligation may be exchanged,
compromised, released or surrendered from time to time; that the time or place
of payment of any Obligation or of any security therefor may be exchanged or
extended, in whole or in part, to a time certain or otherwise, and may be
renewed or accelerated, in whole or in part; that any of the Purchasers may be
granted indulgences generally; that any of the provisions of the Notes may be
renewed, extended, modified, increased, accelerated, compromised, refinanced or
waived; that any borrower may be granted indulgences or released from liability;
that neither the insolvency, bankruptcy and/or dissolution of any borrower or
Guarantor shall affect the obligations hereunder of Guarantor; that neither the
invalidity or unenforceability of any of the Obligations shall affect the
obligations hereunder of Guarantor; that no claim need be asserted against any
trustee in bankruptcy or receiver or other representative in the event any
borrower or Guarantor is adjudicated bankrupt or becomes insolvent; and that any
property to the credit of any borrower or any guarantor or other party liable
for payment of any of the Obligations or liable upon any security therefor may
be released from time to time, in whole or in part, at, before or after the
stated, extended or accelerated maturity of such Obligations, all of which (i)
may be effected without notice to or further assent by Guarantor and (ii) shall
not affect the obligations of Guarantor under this Guaranty.

     4. WAIVER. Guarantor hereby expressly waives:

          (a) Notice of acceptance of this Guaranty;

          (b) Presentment and demand for payment of any Obligation;

          (c) Protest and notice of dishonor or default to Guarantor or to any
other party with respect to any Obligation or any security for any Obligation;

          (d) Demand for payment under this Guaranty;

          (e) Notice of disposition of any security for any Obligation; and

          (f) Any defense by reason of impairment of: (i) any security now or
hereafter held for any Obligation; or (ii) recourse against any party liable for
the payment of any Obligation.

                                       2
<PAGE>

     5. GUARANTY OF PAYMENT. This Guaranty is a guaranty of payment and not of
collection. Guarantor: (a) waives any claim to marshaling of assets; (b) waives
any right to require that an action be brought against any borrower or any other
Person prior to action against Guarantor hereunder; and (c) waives any right to
require that resort be had to any security, as applicable, for the Notes or any
other Obligations guaranteed hereunder prior to action by any of the Purchasers
against Guarantor hereunder. Guarantor shall be released from all liability
hereunder only upon payment in full of all the Obligations.

     6. BINDING EFFECT. The provisions of this Guaranty shall be binding upon
Guarantor and its successors and assigns, and shall inure to the benefit of each
of the Purchasers and their respective successors and assigns; it being
understood that each of the Purchasers is free to assign its respective rights,
benefits, duties and obligations under this Guaranty without the consent of any
other party, and Guarantor may not assign its rights, benefits, duties and
obligations under this Guaranty without the prior written consent of the
Purchasers.

     7. RIGHT OF SET OFF. Each Purchaser agrees that to the extent that
Guarantor has made payment hereunder of all or any portion of principal and
interest required under the Note held by such Purchaser, the full amount of such
payment shall be deducted from amounts allocable and payable to such Purchaser
pursuant to such Note.

     8. LIMITATION OF GUARANTY. Any term or provision of this Guaranty or any
other Transaction Document to the contrary notwithstanding, the maximum
aggregate amount of the Obligations for which Guarantor shall be liable shall
not exceed the maximum amount for which Guarantor can be liable without
rendering this Guaranty or any other Transaction Document, as it relates to
Guarantor, voidable under applicable law relating to fraudulent conveyance or
fraudulent transfer.

     9. REINSTATEMENT. This Guaranty shall remain in full force and effect and
continue to be effective or be reinstated, as the case may be, if at any time
payment or performance of the Obligations, or any part thereof, is, pursuant to
applicable law, rescinded or reduced in amount, or must otherwise be restored or
returned by any obligee of the Obligations or such part thereof, whether as a
"voidable preference," "fraudulent transfer," or otherwise, all as though such
payment or performance had not been made. In the event that any payment, or any
part thereof, is rescinded, reduced, restored or returned, the Obligations
shall, to the fullest extent permitted by law, be reinstated and deemed reduced
only by such amount paid and not so rescinded, reduced, restored or returned.

     10. SUBROGATION. After (and not before) all amounts payable under or in
respect of the Notes have been indefeasibly paid in cash, in the event principal
and interest is thereafter paid with respect to the Notes, Guarantor shall be
subrogated to the rights of the Purchasers to receive payments in respect of the
Notes, but only to the extent of amounts paid by Guarantor pursuant to this
Guaranty.

                                       3
<PAGE>

     11. AMENDMENT. Neither this Guaranty nor any provision hereof shall be
amended, modified, changed, discharged or terminated except by an instrument in
writing signed by the Purchasers and the Guarantor.

     12. LAW. THIS GUARANTY SHALL BE GOVERNED BY, CONSTRUED IN ACCORDANCE WITH,
AND ENFORCED UNDER, THE LAW OF THE STATE OF NEW YORK APPLICABLE TO AGREEMENTS OR
INSTRUMENTS ENTERED INTO AND PERFORMED ENTIRELY WITHIN SUCH STATE.

     13. SEVERABILITY. Wherever possible, each provision of this Guaranty shall
be interpreted in such a manner as to be effective and valid under applicable
law, but if any provision of this Guaranty shall be invalid under such laws,
such provision shall be ineffective only to the extent of such prohibition or
invalidity, without affecting the remainder of such provision or the remaining
provisions of this Guaranty, which shall be binding and enforceable to the
fullest extent allowable by law.

     14. WAIVER. Waiver by any of the Purchasers of a breach of this Guaranty
shall not operate as a waiver of any subsequent breach thereof.

     15. SIGNATURES; COUNTERPARTS. Telefacsimile transmissions of any executed
original document and/or retransmission of any executed telefacsimile
transmission shall be deemed to be the same as the delivery of an executed
original. At the request of any party hereto, the other parties hereto shall
confirm telefacsimile transmissions by executing duplicate original documents
and delivering the same to the requesting party or parties. This Guaranty may be
executed in any number of counterparts and by the parties hereto in separate
counterparts, each of which when so executed shall be deemed to be an original
and all of which taken together shall constitute one and the same instrument.

     16. NOTICES. All notices, demands and other communications provided for or
permitted hereunder shall be made in writing and shall be by registered or
certified first-class mail, return receipt requested, telecopier (with receipt
confirmed), courier service or personal delivery:

          (a) if to Guarantor:

                 c/o TB Wood's Corporation
                 440 North Fifth Avenue
                 Chambersburg, PA  17201-1778
                 Fax No.: (717) 264-2869
                 Attention: William T. Fejes, Jr.

                 with a copy to:

                 Dechert LLP
                 4000 Bell Atlantic Tower
                 1717 Arch Street
                 Philadelphia, PA  19103
                 Fax No.: (215) 994-2222
                 Attention:  David Schulman, Esq.

                                       4
<PAGE>

          (b) if to AEA Mezzanine Funding LLC:

                 AEA Mezzanine Funding LLC c/o AEA Mezzanine
                 Partners LP c/o AEA Mezzanine Management LP
                 200 First Stamford Place Stamford, Connecticut
                 06902 Fax No.: (203) 564-2661 Attention:
                 Joseph D. Carrabino, Jr.

          (c) if to AEA Mezzanine Fund LP:

                 AEA Mezzanine Fund LP c/o AEA Mezzanine
                 Partners LP c/o AEA Mezzanine Management LP
                 200 First Stamford Place Stamford, Connecticut
                 06902 Fax No.: (203) 564-2661 Attention:
                 Joseph D. Carrabino, Jr.

          (d) if to AEA Mezzanine (Unleveraged) Fund LP:

                 AEA Mezzanine (Unleveraged) Fund LP c/o AEA
                 Mezzanine Partners LP c/o AEA Mezzanine
                 Management LP 200 First Stamford Place
                 Stamford, Connecticut 06902 Fax No.: (203)
                 564-2661 Attention: Joseph D. Carrabino, Jr.

                 in the case of (b), (c) and (d) above, with a copy to:

                 Morrison Cohen LLP
                 909 Third Avenue
                 New York, New York  10022
                 Fax No.: (212) 735-8708
                 Attention:  David A. Scherl, Esq.

                                       5
<PAGE>

or to such other address or addresses as shall have been furnished in writing to
the other parties hereto.

     All such notices and communications shall be deemed to have been duly
given: when delivered by hand, if personally delivered; when delivered by
courier, if delivered by commercial overnight courier service; if mailed, five
business days after being deposited in the mail, postage prepaid; or if
telecopied, when receipt is acknowledged.

     17. CONSENTS AND WAIVERS RELATING TO LEGAL PROCEEDINGS.

          (a) EACH PARTY TO THIS GUARANTY HEREBY IRREVOCABLY AGREES THAT THE ANY
LEGAL ACTION OR PROCEEDING ARISING OUT OF OR RELATING TO THIS GUARANTY MAY BE
BROUGHT IN THE COURTS OF THE STATE OF NEW YORK OR OF THE UNITED STATES OF
AMERICA FOR THE SOUTHERN DISTRICT OF NEW YORK AND HEREBY EXPRESSLY SUBMITS TO
THE PERSONAL JURISDICTION AND VENUE OF SUCH COURTS FOR THE PURPOSES THEREOF AND
EXPRESSLY WAIVES ANY CLAIM OF IMPROPER VENUE AND ANY CLAIM THAT THE SUCH COURTS
ARE AN INCONVENIENT FORUM. EACH PARTY HEREBY IRREVOCABLY CONSENTS TO THE SERVICE
OF PROCESS OF ANY OF THE AFOREMENTIONED COURTS IN ANY SUCH SUIT, ACTION OR
PROCEEDING BY THE MAILING OF COPIES THEREOF BY REGISTERED OR CERTIFIED MAIL,
POSTAGE PREPAID, TO ITS ADDRESS SET FORTH IN SECTION 16 SUCH SERVICE TO BECOME
EFFECTIVE 10 DAYS AFTER SUCH MAILING.

          (b) GUARANTOR WAIVES ITS RIGHT TO A JURY TRIAL WITH RESPECT TO ANY
ACTION OR CLAIM ARISING OUT OF ANY DISPUTE IN CONNECTION WITH THIS GUARANTY, ANY
RIGHTS OR OBLIGATIONS HEREUNDER OR THE PERFORMANCE OF SUCH RIGHTS AND
OBLIGATIONS. GUARANTOR (X) CERTIFIES THAT NO REPRESENTATIVE, AGENT OR ATTORNEY
OF ANY OF THE PURCHASERS HAS REPRESENTED, EXPRESSLY OR OTHERWISE, THAT THE
PURCHASERS WOULD NOT, IN THE EVENT OF LITIGATION, SEEK TO ENFORCE THE FOREGOING
WAIVERS AND (Y) ACKNOWLEDGES THAT THE PURCHASERS HAVE BEEN INDUCED TO ENTER INTO
THE PURCHASE AGREEMENT BY, AMONG OTHER THINGS, THE WAIVERS AND CERTIFICATIONS
CONTAINED HEREIN.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]

<PAGE>

     IN WITNESS WHEREOF, the undersigned has executed this Guaranty as of the
date first above written.


                                          TB WOOD'S CORPORATION


                                          By:  _________________________________
                                               Name:
                                               Title:




                       [SIGNATURE PAGE TO PARENT GUARANTY]