Exhibit
10.4


 


AMENDED
AND RESTATED VOTING AGREEMENT


 


THIS
AMENDED AND RESTATED VOTING AGREEMENT (the “Agreement”) is made and entered into as of this 27th day of January,
2017 by and among (i) American Power Group Corporation, a Delaware corporation (the “Company”), (ii) the holders
of the Company’s Subordinated Contingent Convertible Promissory Notes (the “Notes”), and (iii) the holders
of the Company’s 10% Convertible Preferred Stock (the “Series A Preferred Stock”), Series D Convertible
Preferred Stock (the “Series D Preferred Stock”), Series D-2 Convertible Preferred Stock, Series D-3 Convertible
Preferred Stock (all of such preferred stock, together with the Company’s Series E Convertible Preferred Stock (the “Series
E Preferred Stock”) which is issuable upon conversion of the Notes, the “Preferred Stock”) listed
on Schedule A (together with any subsequent investors, or transferees, who become parties hereto as “Investors” pursuant
to the terms hereof, collectively the “Investors”).


 


RECITALS


 


A.       Concurrently
with the execution of this Agreement, the Company and certain of the Investors (the “Purchasers”) are entering
into a Convertible Note Purchase Agreement (the “Purchase Agreement”) providing for the sale and purchase of
the Notes. The Notes are convertible into shares of Series E Preferred Stock.


 


B.
       The Certificate of Designation of Preferences, Rights and Limitations of the Series
A Preferred Stock (the “Series A Certificate”) provides that (i) holders of record of shares of Series A Preferred
Stock, voting as a separate class, shall be entitled to collectively elect three (3) directors of the Company, (ii) holders of
record of shares of Common Stock, voting as a separate class, shall be entitled to elect three (3) directors of the Company, and
(iii) the holders of record of shares of Common Stock and of any other class or series of voting stock, voting together as a single
class, shall be entitled to elect the balance of the total number of directors of the Company.


 


C.       The
Company and certain of the Investors are parties to that certain Amended and Restated Voting Agreement dated as of January 8,
2016 (the “Original Agreement”), pursuant to which the holders of the Series D Preferred Stock were provided
with the right, among other rights, to elect certain members of the board of directors of the Company (the “Board”)
in accordance with the terms of the Original Agreement.


 


D.       It
is a condition to the Purchasers’ obligations to purchase the Notes that the Company and the Investors execute and deliver
this Agreement for the purpose of amending and restating, in its entirety, the Original Agreement.


 




    	 



    	 



    

 


AGREEMENT


 


NOW,
THEREFORE, the parties agree amend and restate the Original Agreement, in its entirety, as follows:


 


1.       Voting
Provisions Regarding Board of Directors.


 


1.1       For
purposes of this Agreement, the term “Shares” shall mean and include any shares of Preferred Stock, by whatever name
called, now owned or subsequently acquired by an Investor, however acquired, whether through stock splits, stock dividends, reclassifications,
recapitalizations, similar events or otherwise, but shall expressly exclude any shares of Common Stock issued upon conversion
of any Shares of the Preferred Stock.


 


1.2       Board
Composition. From and after the Closing (as such term is defined in the Purchase Agreement), each Investor agrees to vote,
or cause to be voted, all Shares owned by such Investor, or over which such Investor has voting control, from time to time and
at all times, in whatever manner as shall be necessary, to fix the number of directors of the Company at seven or at such other
number as may be specified by the Board, with the consent of the holders of a majority of the shares of Series E Preferred Stock
(or, prior to the conversion of the Notes, with the consent of the holders of a majority of the Notes, by principal amount), and
to ensure that at each annual or special meeting of stockholders at which an election of directors is held or pursuant to any
written consent of the stockholders of the Company, the following persons shall be elected to the Board:


 


(a)       So
long as Arrow, LLC (“Arrow”) owns shares of Preferred Stock, two (2) individuals designated by Arrow, who shall
initially be Matthew Van Steenwyk and Charles McDermott; and


 


(b)       So
long as Associated Private Equity LLC (“Associated”) owns shares of Preferred Stock, one (1) individual designated
by Associated, who shall initially be Neil Braverman.


 


(c)       So
long as Arrow owns shares of Preferred Stock, Arrow shall have the exclusive right, as among the holders of the Preferred Stock,
to nominate one (1) of the three (3) candidates for election to the Board by the holders of shares of Common Stock, voting as
a separate class, as specified in the Series A Certificate (the “Common Directors”), and one (1) candidate
for election to the Board by the holders of shares of Common Stock and of all classes and series of voting stock, voting together
as a single class, as specified in the Series A Certificate (the “Joint Director”). From and after the Closing,
each Investor agrees to vote, or cause to be voted, all Shares owned by such Investor, or over which such Investor has voting
control, from time to time and at all times, in favor of the election of the Common Director and Joint Director nominated by Arrow.


 


(d)       So
long as Associated owns shares of Preferred Stock, Associated shall have the exclusive right, as among the holders of the Preferred
Stock, to nominate two (2) of the three (3) candidates for Common Directors. Associated agrees to nominate the Company’s
chief executive officer and one candidate who would be deemed to be an “independent director” under Rule 303A.02 of
the NYSE Listed Company Manual or NASDAQ Marketplace Rule 4200a(15) for election as Common Directors. From and after the Closing,
each Investor agrees to vote, or cause to be voted, all Shares owned by such Investor, or over which such Investor has voting
control, from time to time and at all times, in favor of the election of the Common Directors nominated by Associated.


 




    	2



    	 



    

 


To
the extent that any of the appointment rights set forth in clauses (a) and (b) above shall no longer be applicable due to the
applicable Investor no longer holding Preferred Stock, any member of the Board who would otherwise have been designated in accordance
with the terms thereof shall instead be voted upon by all the holders of the Company’s Series A Preferred Stock entitled
to vote thereon in accordance with, and pursuant to, the Series A Certificate.


 


The
nomination rights and voting agreement set forth in clauses (c) and (d) above constitute an agreement among the Investors only,
and shall in no way alter or limit the rights of any holder of Common Stock (other than with respect to such holder’s Shares)
to nominate and/or vote for candidates of their own choosing for election to the Board in accordance with the Company’s
By-Laws and the Delaware General Corporation Law.


 


For
purposes of this Agreement, an individual, firm, corporation, partnership, association, limited liability company, trust or any
other entity (collectively, a “Person”) shall be deemed an “Affiliate” of another Person who, directly
or indirectly, controls, is controlled by or is under common control with such Person, including, without limitation, any general
partner, managing member, officer or director of such Person or any venture capital fund now or hereafter existing that is controlled
by one or more general partners or managing members of, or shares the same management company with, such Person.


 


1.3       Failure
to Designate a Board Member. In the absence of any designation from the Persons or groups with the right to designate a director
as specified above, the director previously designated by them and then serving shall be reelected if still eligible to serve
as provided herein.


 


1.4       Removal
of Board Members. Each Investor also agrees to vote, or cause to be voted, all Shares owned by such Investor, or over which
such Investor has voting control, from time to time and at all times, in whatever manner as shall be necessary to ensure that:


 


(a)       no
director elected pursuant to Sections 1.2(a) or (b) of this Agreement may be removed from office unless: (i) such
removal is directed or approved by the affirmative vote of the Person, or of the holders of a majority of the shares of stock
(or each class of stock), entitled under Section 1.2 to designate that director, or (ii) the Person(s) originally entitled
to designate or approve such director or occupy such Board seat pursuant to Sections 1.2(a) or (b) is no longer
so entitled to designate or approve such director or occupy such Board seat;


 


(b)       any
vacancies created by the resignation, removal or death of a director elected pursuant to Sections 1.2(a) or (b)
shall be filled pursuant to the provisions of Section 1.2; and


 


(c)       upon
the request of any party or parties entitled to designate a director as provided in Sections 1.2(a) or (b), to remove
such director, such director shall be removed.


 


All
Investors agree to execute any written consents required to perform the obligations of this Agreement, and the Company agrees
at the request of any party entitled to designate directors to call a special meeting of stockholders for the purpose of electing
directors.


 




    	3



    	 



    

 


1.5       No
Liability for Election of Recommended Directors. No party, nor any Affiliate of any such party, shall have any liability as
a result of designating a Person for election as a director for any act or omission by such designated Person in his or her capacity
as a director of the Company, nor shall any party have any liability as a result of voting for any such designee in accordance
with the provisions of this Agreement.


 


2.       Remedies.


 


2.1       Covenants
of the Company. The Company agrees to use its reasonable best efforts, within the requirements of applicable law, to ensure
that the rights granted under this Agreement are effective and that the parties enjoy the benefits of this Agreement. Such actions
include, without limitation, the use of the Company’s reasonable best efforts to cause the nomination and election of the
directors as provided in this Agreement.


 


2.2       Irrevocable
Proxy. Each party to this Agreement hereby constitutes and appoints the President of the Company, and each member of the Board,
and each of them, with full power of substitution, as the proxies of the party with respect to the matters set forth herein, including
without limitation, election of persons as members of the Board in accordance with Section 1 hereto, and hereby authorizes
each of them to represent and to vote, if and only if the party: (i) fails to vote, or (ii) attempts to vote (whether by proxy,
in person or by written consent), in a manner which is inconsistent with the terms of this Agreement, all of such party’s
Shares in favor of the election of persons as members of the Board determined pursuant to and in accordance with the terms and
provisions of this Agreement. The proxy granted pursuant to the immediately preceding sentence is given in consideration of the
agreements and covenants of the Company and the parties in connection with the transactions contemplated by this Agreement and,
as such, is coupled with an interest and shall be irrevocable unless and until this Agreement terminates. Each party hereto hereby
revokes any and all previous proxies with respect to the Shares and shall not hereafter, unless and until this Agreement terminates,
purport to grant any other proxy or power of attorney with respect to any of the Shares, deposit any of the Shares into a voting
trust or enter into any agreement (other than this Agreement), arrangement or understanding with any person, directly or indirectly,
to vote, grant any proxy or give instructions with respect to the voting of any of the Shares, in each case, with respect to any
of the matters set forth herein.


 


2.3       Specific
Enforcement. Each party acknowledges and agrees that each party hereto will be irreparably damaged in the event any of the
provisions of this Agreement are not performed by the parties in accordance with their specific terms or are otherwise breached.
Accordingly, it is agreed that each of the Company and the Investors shall be entitled to an injunction to prevent breaches of
this Agreement and to specific enforcement of this Agreement and its terms and provisions in any action instituted in any court
of the United States or any state having subject matter jurisdiction.


 


2.4       Remedies
Cumulative. All remedies, either under this Agreement or by law or otherwise afforded to any party, shall be cumulative and
not alternative.


 




    	4



    	 



    

 


3.       Miscellaneous.


 


3.1       Additional
Parties.


 


(a)       Notwithstanding
anything to the contrary contained herein, if the Company issues additional shares of Preferred Stock after the date hereof as
a condition to the issuance of such shares, the Company shall require that any purchaser of said shares become a party to this
Agreement by executing and delivering: (i) the Adoption Agreement attached to this Agreement as Exhibit A, along with the
Spousal Waiver, as applicable, attached to this Agreement as Exhibit B, or (ii) a counterpart signature page hereto agreeing
to be bound by and subject to the terms of this Agreement as an Investor hereunder, along with the Spousal Waiver, as applicable,
attached to this Agreement as Exhibit B. In either event, each person who executes and delivers the Adoption Agreement
shall thereafter be deemed an Investor for all purposes under this Agreement.


 


(b)       In
the event that after the date of this Agreement, the Company enters into an agreement with any Person to issue shares of Preferred
Stock to such Person (other than to a purchaser of Preferred Stock described in Section 3.1(a) above), the Company shall
cause such Person, as a condition precedent to entering into such agreement, to become a party to this Agreement by executing
an Adoption Agreement, in the form attached hereto as Exhibit A, agreeing to be bound by and subject to the terms of this
Agreement as an Investor, along with the Spousal Waiver, as applicable, attached to this Agreement as Exhibit B, and thereafter
such person shall be deemed an Investor for all purposes under this Agreement.


 


3.2       Transfers.
Each transferee or assignee of any Shares subject to this Agreement shall continue to be subject to the terms hereof, and, as
a condition precedent to the Company’s recognizing such transfer, each transferee or assignee shall agree in writing to
be subject to each of the terms of this Agreement by executing and delivering an Adoption Agreement substantially in the form
attached hereto as Exhibit A, along with the Spousal Waiver, attached to this Agreement as Exhibit B. Upon the execution
and delivery of an Adoption Agreement by any transferee and the Spousal Waiver by the transferee’s spouse, such transferee
shall be deemed to be a party hereto as if such transferee were the transferor and such transferee’s signature appeared
on the signature pages of this Agreement and shall be deemed to be an Investor. The Company shall not permit the transfer of the
Shares subject to this Agreement on its books or issue a new certificate representing any such Shares unless and until such transferee
shall have complied with the terms of this Section 3.2. Each certificate representing the Shares subject to this Agreement
if issued on or after the date of this Agreement shall be endorsed by the Company with the legend set forth in Section 3.11.


 


3.3       Successors
and Assigns. The terms and conditions of this Agreement shall inure to the benefit of and be binding upon the respective successors
and assigns of the parties. Nothing in this Agreement, express or implied, is intended to confer upon any party other than the
parties hereto or their respective successors and assigns any rights, remedies, obligations, or liabilities under or by reason
of this Agreement, except as expressly provided in this Agreement.


 




    	5



    	 



    

 


3.4       Jurisdiction;
Governing Law. All questions concerning the construction, validity, enforcement and interpretation of this Warrant shall be
determined in accordance with the provisions of the Purchase Agreement.


 


3.5       Titles
and Subtitles. The titles and subtitles used in this Agreement are used for convenience only and are not to be considered
in construing or interpreting this Agreement.


 


3.6       Notices.
Any notice, request or other document required or permitted to given or delivered to any party hereto shall be delivered in accordance
with the notice provisions of the Purchase Agreement.


 


3.7       Consent
Required to Amend, Terminate or Waive. This Agreement may be amended or terminated and the observance of any term hereof may
be waived (either generally or in a particular instance and either retroactively or prospectively) only by a written instrument
executed by the Investors holding 67% of the Shares then held thereby. Notwithstanding the foregoing:


 


(i)       this
Agreement may not be amended or terminated and the observance of any term of this Agreement may not be waived with respect to
any Investor without the written consent of such Investor unless such amendment, termination or waiver applies to all Investors
in the same fashion;


 


(ii)       the
consent of the Investor shall not be required for any amendment or waiver if such amendment or waiver is not, directly or indirectly,
applicable to the rights of the Investor hereunder;


 


(iii)       Schedule
A hereto may be amended by the Company from time to time without the consent of other parties with respect to the Investors
by adding other additional parties as Investors; and


 


(iv)       any
provision hereof may be waived by the waiving party on such party’s own behalf, without the consent of any other party.


 


In
addition, notwithstanding anything to the contrary contained herein, any provision of this Section 3.7 that requires a
particular Investor consent to a particular amendment may not be amended or terminated without the consent of such Investor. The
Company shall give prompt written notice of any amendment, termination or waiver hereunder to any party that did not consent in
writing thereto. Any amendment, termination or waiver effected in accordance with this Section 3.7 shall be binding on
each party and all of such party’s successors and permitted assigns, whether or not any such party, successor or assignee
entered into or approved such amendment, termination or waiver.


 


3.8       Delays
or Omissions. No delay or omission to exercise any right, power or remedy accruing to any party under this Agreement, upon
any breach or default of any other party under this Agreement, shall impair any such right, power or remedy of such non-breaching
or non-defaulting party nor shall it be construed to be a waiver of any such breach or default, or an acquiescence therein, or
of or in any similar breach or default thereafter occurring; nor shall any waiver of any single breach or default be deemed a
waiver of any other breach or default previously or thereafter occurring. Any waiver, permit, consent or approval of any kind
or character on the part of any party of any breach or default under this Agreement, or any waiver on the part of any party of
any provisions or conditions of this Agreement, must be in writing and shall be effective only to the extent specifically set
forth in such writing. All remedies, either under this Agreement or by law or otherwise afforded to any party, shall be cumulative
and not alternative.


 




    	6



    	 



    

 


3.9       Severability.
The invalidity or unenforceability of any provision hereof shall in no way affect the validity or enforceability of any other
provision.


 


3.10       Entire
Agreement. This Agreement (including the Exhibits hereto), and the Series A Certificate and the other Transaction Agreements
(as defined in the Purchase Agreement) constitute the full and entire understanding and agreement between the parties with respect
to the subject matter hereof, and any other written or oral agreements relating to the subject matter hereof existing between
the parties (including, without limitation, the Original Agreement) are expressly canceled.


 


3.11       Legend
on Share Certificates. Each certificate representing Shares issued after the date hereof shall be endorsed by the Company
with a legend reading substantially as follows:


 


“THE
SHARES EVIDENCED HEREBY ARE SUBJECT TO A VOTING AGREEMENT, AS MAY BE AMENDED FROM TIME TO TIME, (A COPY OF WHICH MAY BE OBTAINED
UPON WRITTEN REQUEST FROM THE COMPANY), AND BY ACCEPTING ANY INTEREST IN SUCH SHARES THE PERSON ACCEPTING SUCH INTEREST SHALL
BE DEEMED TO AGREE TO AND SHALL BECOME BOUND BY ALL THE PROVISIONS OF THAT VOTING AGREEMENT, INCLUDING CERTAIN RESTRICTIONS ON
TRANSFER AND OWNERSHIP SET FORTH THEREIN.”


 


The
Company, by its execution of this Agreement, agrees that it will cause the certificates evidencing the Shares issued after the
date hereof to bear the legend required by this Section 3.11 of this Agreement, and it shall supply, free of charge, a
copy of this Agreement to any holder of a certificate evidencing Shares upon written request from such holder to the Company at
its principal office. The parties to this Agreement do hereby agree that the failure to cause the certificates evidencing the
Shares to bear the legend required by this Section 3.11 herein and/or the failure of the Company to supply, free of charge,
a copy of this Agreement as provided hereunder shall not affect the validity or enforcement of this Agreement.


 


3.12       Stock
Splits, Stock Dividends, etc. In the event of any issuance of Shares of the Company’s voting securities hereafter to
any of the Investors (including, without limitation, in connection with any stock split, stock dividend, recapitalization, reorganization,
or the like), such Shares shall become subject to this Agreement and shall be endorsed with the legend set forth in Section
3.11.


 




    	7



    	 



    

 


3.13       Manner
of Voting. The voting of Shares pursuant to this Agreement may be effected in person, by proxy, by written consent or in any
other manner permitted by applicable law.


 


3.14       Further
Assurances. At any time or from time to time after the date hereof, the parties agree to cooperate with each other, and at
the request of any other party, to execute and deliver any further instruments or documents and to take all such further action
as the other party may reasonably request in order to evidence or effectuate the consummation of the transactions contemplated
hereby and to otherwise carry out the intent of the parties hereunder.


 


3.15       Costs
of Enforcement. If any party to this Agreement seeks to enforce its rights under this Agreement by legal proceedings, the
non-prevailing party shall pay all costs and expenses incurred by the prevailing party, including, without limitation, all reasonable
attorneys’ fees.


 


3.16       Counterparts.
This Agreement may be executed and delivered in two or more counterparts, each of which shall be deemed an original, but all of
which together shall constitute one and the same instrument. Counterparts may be delivered via facsimile, electronic mail (including
pdf) or other transmission method and any counterpart so delivered shall be deemed to have been duly and validly delivered to
be valid and effective for all purposes.


 


3.17       Aggregation
of Stock. All Shares held or acquired by an Investor and/or its Affiliates shall be aggregated together for the purpose of
determining the availability of any rights under this Agreement, and such Affiliated persons may apportion such rights as among
themselves in any manner they deem appropriate.


 


[Signature
Page Follow]


 




    	8



    	 



    

 


IN
WITNESS WHEREOF, the parties have executed this Amended and Restated Voting Agreement as of the date first written above.


 





	AMERICAN POWER GROUP CORPORATION	 
	 	 
	By: 	/s/
    Charles E. Coppa	 
	Name:	Charles E. Coppa,
    Chief Financial Officer	 




 


	INVESTORS:	 	 


 


	 	By:
    	 
	 	Name:	 
	 	Address:	 
	 	 	 


 


[Investor
signature pages to this agreement are on file with 


American
Power Group Corporation and are intentionally omitted]


 




    	9



    	 



    

 


SCHEDULE
A


 


LIST
OF INVESTORS


 


[Intentionally
omitted]


 




    	 



    	 



    

 


EXHIBIT
A


 


ADOPTION
AGREEMENT


 


This
Adoption Agreement (this “Adoption Agreement”) is executed by the undersigned (the “Investor”)
pursuant to the terms of that certain Amended and Restated Voting Agreement dated as of January 27, 2017 (the “Agreement”),
by and among American Power Group Corporation, a Delaware corporation (the “Company”) and certain of its stockholders,
as such Agreement may be amended or amended and restated hereafter. Capitalized terms used but not defined in this Adoption Agreement
shall have the respective meanings ascribed to such terms in the Agreement. By the execution of this Adoption Agreement, the Investor
agrees as follows.


 


1.       Acknowledgement.
Investor acknowledges that Investor is acquiring certain shares of the Preferred Stock of the Company (including options, warrants
or other rights thereto, the “Securities”), either as a transferee
or as a party who has agreed to be bound by the terms of the Agreement.


 


2.       Agreement.
Investor hereby (a) agrees that the Securities, and any other shares of Preferred Stock or securities required by the Agreement
to be bound thereby, shall be bound by and subject to the terms of the Agreement, (b) adopts the Agreement with the same
force and effect as if Investor were originally a party thereto; and (c) agrees to sign any and all documents pertaining to the
acquisition of Preferred Stock as the Company may reasonably request.


 


3.       Notice.
Any notice required or permitted by the Agreement shall be given to Investor at the address or facsimile number listed below Investor’s
signature hereto.


 


	DATE:
    	 	 	INVESTOR:	 


 


	 	By:
    	                                         
	 	Name:	 
	 	 	 
	 	Address:	 



 



Facsimile Number:  ___________________________________


 


	ACCEPTED
    AND AGREED:	 
	 	 	 
	AMERICAN
    POWER GROUP CORPORATION	 
	 	 
	By:
    	                    	 
	Name:	 	 
	Title:	 	 


 




    	11



    	 



    

 


EXHIBIT B


 


CONSENT
OF SPOUSE


 


I,
____________________, spouse of ______________,
acknowledge that I have read the Amended and Restated Voting Agreement, dated as of January 27, 2017, to which this Consent is
attached as Exhibit B (the “Agreement”), and that I know the contents of the Agreement. I am aware
that the Agreement contains provisions regarding the voting of shares of capital stock of the Company that my spouse may own,
including any interest I might have therein.


 


I
hereby agree that my interest, if any, in any shares of capital stock of the Company subject to the Agreement shall be irrevocably
bound by the Agreement and further understand and agree that any community property interest I may have in such shares of capital
stock of the Company shall be similarly bound by the Agreement.


 


I
am aware that the legal, financial and related matters contained in the Agreement are complex and that I am free to seek independent
professional guidance or counsel with respect to this Consent. I have either sought such guidance or counsel or determined after
reviewing the Agreement carefully that I will waive such right.


 


	DATE: __________________________________________	 	 
	 	 	 
	 	Name: