Exhibit 10.4

AMENDED AND RESTATED EMPLOYMENT AGREEMENT  Richard D. Smith

THIS AMENDED AND RESTATED EMPLOYMENT AGREEMENT, dated and effective as of December 22, 2008, is between Allied Motion
Technologies Inc., a Colorado corporation (the "Company"), and Richard D. Smith ("Employee").

RECITALS:

WHEREAS, the Employee has acknowledged skills and experience in the business conducted by the Company and the Company desires to obtain
the benefit of the Employee's knowledge, skills and experience and assure itself of the ongoing right to Employee's services from and after the date hereof, and is willing to do so on the terms and
conditions set forth in this Agreement; and

WHEREAS,
Employee is willing and able to render services to the Company, from and after the date hereof, on the terms and conditions set forth in this Agreement; and

WHEREAS,
the Company and Employee entered into an Employment Agreement effective as of August 1, 2003; and

WHEREAS,
the Company and Employee desire to amend and restate the Employment Agreement in order to conform with the requirements of Section 409A of the Internal Revenue Code of
1986, as amended (the Code").

AGREEMENT:

NOW, THEREFORE, the Company and Employee agree as follows:

1.    Employment.



---





2.    Term of Employment.The original term of this Agreement extended to July 31, 2008. Unless terminated
as provided in Section 4 hereof, the term of this Agreement shall automatically continue on a year to year basis (each a "Subsequent Period") unless the Company or Employee shall give the other
party notice at least 60 days prior to the termination of the Initial Period or any Subsequent Period of its or his election not to renew the term of employment, in which case this Agreement
shall terminate at the end of the period in which the notice is given; provided, however, the Company's obligation to pay compensation pursuant to Section 3 or perform any other acts with
respect to the last year for which this Agreement is effective shall continue and be enforceable notwithstanding the termination of this Agreement.

3.    Compensation Benefits.



2

---





4.    Termination.This Agreement may be terminated by the Company or Employee as provided in this
Section 4. Notwithstanding anything in this Agreement to the contrary, any payment that is subject to Code Section 409A and is payable upon termination of this agreement due to
Retirement, Disability, or termination of employment other than for cause, shall only be made if such termination otherwise meets the definition of a "separation from service" as defined under Code
Section 409A. Furthermore, if Employee is a "specified employee" within the meaning of Code Section 409A, the payment of any amount that is both subject to Code Section 409A and
due upon termination of this

3

---



Agreement
shall not be made until at least six months following Employee's separation from service. At that time, all amounts, if any, that would have been paid during the six-month period
shall be paid to Employee, and thereafter all payments shall be made as if there had been no six-month delay.



4

---





5

---





5.    Confidential Information.



6

---





6.    Inventions and Discoveries.Employee hereby assigns to the Company all of the Employee's rights, title and
interest in and to all inventions, techniques, discoveries, processes, designs or improvements (whether patentable or not), any industrial design (whether registrable or not), or uses Confidential
Information as described in Section 5.1, or other intellectual property rights pertaining thereto, that relates in any way to, or is useful in any manner in, the business then being conducted
or proposed to be conducted by the Company, and any such item created by the Employee, either solely or in conjunction with others, following termination of Employee's employment with the Company
(hereinafter referred to collectively as the "Inventions"). Promptly upon the development or making of any Invention or improvement thereon, Employee shall disclose the same to the Company and shall
execute and deliver to the Company such reasonable documents as the Company may request to confirm the assignment of Employee's rights therein and if requested by the Company, shall assist the Company
in applying for and prosecuting any patents which may be available in respect thereof. Employee acknowledges that all of Employee's Company-related writing, works of authorship, specially commissioned
works and other Employee Inventions are works made for hire, property of the Company, including all copyrights, patents, and other intellectual property rights pertaining thereto. If it is determined
that any such works are not works made for hire, the Employee hereby assigns to the Company all of the Employee's right, title, and interest, including all rights of copyright, patent, and other
intellectual property rights, to or in such Inventions.

7.    Restrictive Covenant.



7

---





8.    Arbitration.Any controversy or claim arising out of or relating to this Agreement or the breach thereof
shall be settled by arbitration in the City and County of Denver in accordance with the rules of the American Arbitration Association. Judgment upon the award rendered by the arbitrators may be
entered in any court having jurisdiction thereof. The Company shall pay all costs of arbitration. In the event that it shall be necessary or desirable for Employee to retain legal counsel and/or incur
other costs and expenses in connection with interpretation of his rights under this Agreement, including any procedure in arbitration, Employee shall be entitled to recover from the Company reasonable
attorneys' fees and costs and expenses incurred by him in connection with such interpretation or arbitration, regardless of the final outcome, unless the arbitrator shall determine that under the
circumstances such payment would be unjust. Reimbursement of attorneys' fees, costs and expenses shall be subject to the following requirements: (a) such reimbursement shall be available to the
Employee for as long as he has enforceable rights under this Agreement; (b) reimbursements provided during the Employee's taxable year may not affect the reimbursements provided in any other
taxable year; (c) reimbursement must be made on or before the last day of the Employee's taxable year following the taxable year in which the expense was incurred; and (d) no
reimbursement provided under this paragraph shall be subject to liquidation or exchange for another benefit.

9.    Mitigation.Employee shall not be required to mitigate the amount of any payment provided in this Agreement
by seeking other employment or otherwise, nor shall the amount of any payment or benefit provided in this Agreement be reduced by any compensation earned by Employee as the result of employment by
another employer, by retirement benefits, by offset against any amount claimed to be owed by Employee to the Company, or otherwise.

10.    Announcements.No public announcement regarding termination of employment of the Employee or any change in
status of the Employee of the Company shall be made without Employee's approval except the Company may announce Employee's termination if Company is otherwise required to do so pursuant to the rules
of the Securities and Exchange Commission or to any other legal requirement. All matters with respect to termination of employment of Employee, retirement of Employee or other action taken pursuant to
this Agreement shall be kept confidential and neither Company nor Employee will make unfavorable comments about the other in connection with this Agreement.

11.    Severability.If any provision of this Agreement, including the Restrictive Covenant in Section 7, is
held invalid or unenforceable, either in its entirety or by virtue of its scope or application to given circumstances, such provision shall thereupon be deemed modified only to the extent necessary to
render same valid, or not applicable to given circumstances, or excised from this Agreement, as the situation may require, and this Agreement shall be construed and enforced as if such provision had
been included herein as so modified in scope or application, or had not been included herein, as the case may be.

8

---



12.    Non-Assignability.In light of the unique personal services to be performed by Employee
hereunder, it is acknowledged and agreed that any purported or attempted assignment or transfer by Employee of this Agreement or any of Employee's duties, responsibilities or obligations hereunder
shall be void. This Agreement may not be assigned by the Company without the prior written consent of Employee.

13.    Notices.Any notice, request, demand or other communication required or permitted under this Agreement shall
be in writing and shall be deemed to have been given when delivered personally or on the date of receipt when mailed by certified mail, return receipt requested, addressed as follows:

If to the Company:

Allied Motion Technologies, Inc.23 Inverness Way East, Ste 150
Englewood, Colorado 80112
Attention: Chairman and SecretaryIf to the Employee:

Richard D. Smith


or
to such other address or addresses as may be specified from time to time by notice; provided however, that any notice of change of address shall not be effective until its receipt by the party to
be charged therewith.

14.    General.



9

---





IN
WITNESS WHEREOF, the parties hereto have executed this Agreement on and as of the date first set forth above.

ALLIED MOTION TECHNOLOGIES INC.By:

/s/ DELWIN HOCK Delwin HockChairman/s/ RICHARD D. SMITH Richard D. SmithEmployee


10

---



QuickLinks