Document:

EX-10.4

 Exhibit 10.4 

AMENDED AND RESTATED 

EMPLOYMENT AGREEMENT 
 This
AMENDED AND RESTATED EMPLOYMENT AGREEMENT (the “Agreement”) is made and entered into as of July 28, 2014 by and between EAST BOSTON SAVINGS BANK, a bank organized under the laws of the Commonwealth of Massachusetts with its
headquarters located in East Boston, Massachusetts (the “Bank”), and Richard J. Gavegnano (the “Executive”). The Agreement is effective as of January 8, 2009 (the “Effective Date”). 

WHEREAS, the Executive originally entered into an employment agreement with the Bank on January 8, 2009 (the “Original
Agreement”); and 
 WHEREAS, in connection with the conversion of Meridian Financial Services, Incorporated (the
“MHC”) from the mutual holding company to the stock holding company form of organization, the Bank desires to amend and restate the Original Agreement in order to remove any reference to the MHC structure and to make certain other changes;
and 
 WHEREAS, the Original Agreement may be amended in accordance with Section 18 of the Original Agreement; and 

WHEREAS, the Executive has agreed to such amendment and restatement of the Original Agreement; and 

WHEREAS, the Board of Directors of the Bank and the Executive believe it is in the best interests of the Bank to enter into the
Agreement in order to reinforce and reward the Executive for his service and dedication to the continued success of the Bank. 
 NOW,
THEREFORE, in consideration of the mutual covenants contained in this Agreement, the Bank and the Executive agree as follows: 
 1 .
Employment. The Bank agrees to employ the Executive and the Executive agrees to be employed by the Bank on the terms and conditions set forth in this Agreement. 

2. Capacity. The Executive shall serve the Bank as President and Chief Executive Officer, and as Chairman of the Board of Directors.
The Executive shall also serve the Bank in such other or additional offices as the Executive may be requested to serve by the Board of Directors of the Bank (the “Board of Directors”). In such capacity or capacities, the Executive shall
perform such services and duties in connection with the business, affairs and operations of the Bank as may be assigned or delegated to the Executive from time to time by or under the authority of the Board of Directors, and the Executive shall
adhere to all policies established by the Board of Directors or Committees thereof at all times. If as a result of the Board of Directors directing the Executive to serve in such “other” office(s) the Executive would have a right to
terminate his employment for Good Reason pursuant to Section 6(b)(i) below, then he will be entitled to the benefits as are provided to him under Section 7(e) below. 

 3. Term. 

(a) The term of this Agreement shall be (i) the initial term, consisting of the period commencing on the Effective Date and ending on the
second anniversary of the Effective Date, plus (ii) any and all extensions of the initial term made pursuant to this Section 3, unless terminated at an earlier date pursuant to Section 6 below. 

(b) The term of this Agreement shall be extended for one day each day so that a constant twenty-four (24) calendar month term shall
remain in effect, until such time as the Board of Directors or the Executive elects not to extend the term of the Agreement by giving written notice to the other party in accordance with the terms of this Agreement, in which case the term of this
Agreement shall be fixed and shall end on the second anniversary of the date of such written notice. 
 4. Compensation and Benefits.
The regular compensation and benefits payable to the Executive under this Agreement shall be as follows: 
 (a) Salary. For all
services rendered by the Executive under this Agreement, the Bank shall pay the Executive a salary (the “Salary”) at the annual rate of $600,000, subject to increase from time to time in the discretion of the Board of Directors. The Salary
shall be payable in periodic installments in accordance with the Bank’s usual practice for its senior executives. 
 (b) Bonus.
The Executive shall be entitled to participate in an annual incentive program established by the Board of Directors with such terms as may be established in the sole discretion of the Board of Directors. 

(c) Regular Benefits. The Executive shall also be entitled to participate in any employee benefit plans, medical insurance plans, life
insurance plans, disability income plans, retirement plans, vacation plans, expense reimbursement plans and other benefit plans which the Bank may from time to time have in effect for all or most of its senior executives, and for which the Executive
is eligible. Such participation shall be subject to the terms of the applicable plan documents, generally applicable policies of the Bank, and applicable law. Nothing contained in this Agreement shall be construed to create any obligation on the
part of the Bank to establish any such plan or to maintain the effectiveness of any such plan which may be in effect from time to time. 

(d) Taxation of Payments and Benefits. The Bank shall undertake to make deductions, withholdings and tax reports with respect to
payments and benefits under this Agreement to the extent that it reasonably and in good faith believes that it is required to make such deductions, withholdings and tax reports. Payments under this Agreement shall be in amounts net of any such
deductions or withholdings. Nothing in this Agreement shall be construed to require the Bank to make any payments to compensate the Executive for any adverse tax effect associated with any payments or benefits or for any deduction or withholding
from any payment or benefit. 

  
 2 

 (e) Exclusivity of Salary and Benefits. The Executive shall not be entitled to any
payments or benefits other than those provided under this Agreement. 
 5. Extent of Service. During the Executive’s employment
under this Agreement, the Executive shall, subject to the direction and supervision of the Board of Directors, devote the Executive’s full business time, best efforts and business judgment, skill and knowledge to the advancement of the
Bank’s interests and to the discharge of the Executive’s duties and responsibilities under this Agreement. The Executive shall not engage in any other business activity, except as may be approved by the Board of Directors; provided that
nothing in this Agreement shall be construed as preventing the Executive from: 
 (a) investing the Executive’s assets in any company
or other entity in a manner not prohibited by Section 9(d) and in such form or manner as shall not require any material activities on the Executive’s part in connection with the operations or affairs of the companies or other entities in
which such investments are made; or 
 (b) engaging in religious, charitable or other community or non-profit activities that do not impair
the Executive’s ability to fulfill the Executive’s duties and responsibilities under this Agreement. 
 6. Termination. The
Executive’s employment under this Agreement shall terminate under the following circumstances set forth in this Section 6. 
 (a)
Termination by the Bank for Cause. The Executive’s employment under this Agreement may be terminated for Cause without further liability on the part of the Bank effective immediately upon a vote of the Board of Directors and written
notice to the Executive. Only the following shall constitute “Cause” for such termination: 
 (i) the conviction
of, the Executive for any felony involving deceit, dishonesty or fraud; 
 (ii) a material act or acts of dishonesty in
connection with the performance of the Executive’s duties, including without limitation, material misappropriation of funds or property; 

(iii) an act or acts of gross misconduct by the Executive; or 

(iv) continued, willful and deliberate non-performance by the Executive of duties (other than by reason of illness or
disability) which has continued for more than 30 days following written notice of non-performance from the Board of Directors (or Executive Committee) which specifically describes the alleged non-performance. 

A determination of whether the Executive’s employment shall be terminated for Cause shall be made at a meeting of the Board of Directors called and held
for such purpose, at which the Board of Directors makes a finding that in the good faith opinion of the Board of Directors an event set 

  
 3 

 
forth in subclauses (i), (ii), (iii) or (iv) has occurred and specifying the particulars thereof in detail. The Executive shall be permitted to appear before the Board of Directors
prior to any such determination, without legal counsel, to explain his position on whether there is Cause for his termination. If the Executive disputes the Board’s determination of Cause, he may request arbitration pursuant to Section 10
below. The fact that the Board may have acted in good faith in making the determination of Cause is not determinative of whether in fact the Board had Cause to terminate the Executive. 

(b) Termination by the Executive. The Executive’s employment under this Agreement may be terminated by the Executive by written
notice to the Board of Directors within sixty (60) days following an event constituting “Good Reason.” The Executive’s termination of employment shall become effective on the thirty-first (31st) day following such notice, provided the Bank has not remedied the condition giving rise to the event of “Good Reason.” For purposes of this Agreement, “Good Reason” shall
mean: 
 (i) a material diminution or other substantial adverse change, not consented to by Executive, in the nature or scope
of the Executive’s responsibilities and authorities; 
 (ii) any demotion of the Executive from his current title of
Chief Executive Officer or removal from his seat on the Board of Directors; 
 (iii) a material reduction in the
Executive’s base salary except for across-the-board reductions similarly affecting all or substantially all officers; 

(iv) involuntary relocation of the Bank’s offices in which the Executive is principally employed by more than 50 miles (10
miles in the event of a Change in Control); or 
 (v) failure of the Bank to comply with material terms of this Agreement or
the Executive’s executive supplemental retirement agreement. 
 (c) Termination by the Bank Without Cause. The Executive’s
employment under this Agreement may be terminated by the Bank without Cause (which, for purposes of clarification, shall not include a termination of Executive’s employment under this Agreement due to Executive’s death or Disability) upon
written notice to the Executive. A determination of whether the Executive’s employment shall be terminated without Cause will be made solely by the Executive Committee of the Board of Directors. 

(d) Termination by the Executive Other Than For Good Reason. The Executive may terminate his employment other than for Good Reason by
giving 30 days advance notice to the Bank. 
 (e) Disability. If the Executive shall be disabled so as to be unable to perform the
essential functions of the Executive’s then existing position or positions under this 

  
 4 

 
Agreement with or without reasonable accommodation, for a total of more than 90 days in any calendar year, the Board of Directors may terminate the Executive’s employment upon written notice
to the Executive. If any question shall arise as to whether during any period the Executive is disabled so as to be unable to perform the essential functions of the Executive’s then existing position or positions with or without reasonable
accommodation, the Executive may, and at the request of the Bank shall, submit to the Bank a certification in reasonable detail by a physician selected by the Bank to whom the Executive or the Executive’s guardian has no reasonable objection as
to whether the Executive is so disabled, and such certification shall for the purposes of this Agreement be conclusive of the issue. The physician shall be board-certified in the area of medicine applicable to the particular disability involved. The
Executive shall cooperate with any reasonable request of the physician in connection with such certification. If such question shall arise and the Executive shall fail to submit such certification (unless the failure results from matters beyond the
control of the Executive), the Bank’s determination will determine the issue of whether the Executive is disabled. Nothing in this Section 6(d) shall be construed to waive the Executive’s rights, if any, under existing law including,
without limitation; the Family and Medical Leave Act of 1993, 29 U.S.C. §2601 et seq., the Americans with Disabilities Act, 42 U.S.C. §12101 et seq, Massachusetts General Laws Chapter 151B, and Section 10 below. 

(f) Death. The Executive’s employment hereunder shall terminate upon his death. 

(g) Termination and Board Membership. To the extent Executive is a member of the board of directors or trustees of the Bank or any of
its affiliates on the date of termination of employment with the Bank (other than a termination due to normal retirement), Executive will resign from all of the boards of directors and trustees immediately following such termination of employment
with the Bank. Executive will be obligated to tender this resignation regardless of the method or manner of termination (other than termination due to normal retirement), and such resignation will not be conditioned upon any event or payment. 

7. Certain Compensation Upon Termination. 

(a) Compensation Upon Voluntary Termination. If the Executive shall resign (including by retirement) and voluntarily terminate
employment without Good Reason, the Bank shall pay to the Executive the Executive’s accrued and unpaid salary, accrued and unpaid vacation pay and all rights and benefits that the Executive is entitled to receive under the terms of the
Bank’s benefit plans or arrangements, including the Executive’s rights under any Supplemental Executive Retirement Agreement in effect between the Bank and the Executive (the “Accrued Obligations”), including the agreement
originally effective July 1, 2007 and subsequently amended and restated. 
 (b) Compensation Upon Death. In the event the
Executive’s employment shall terminate in the event of his death, his surviving spouse (or estate if there is no surviving spouse) shall be entitled to receive the Accrued Obligations, including a pro-rata bonus through the date of his death.
His surviving spouse (or estate if there is no surviving spouse) shall also be entitled to any death benefit provided under the Bank’s life insurance plans and any Endorsement Split Dollar Agreement in effect between the Bank and the Executive,
including the agreement effective January 8, 2009. 

  
 5 

 (c) Compensation Upon Disability. In the event the Executive’s employment shall
terminate by reason of disability as provided in Section 6(d) above, he shall be entitled to his Accrued Obligations, including a pro-rata bonus through the date of his disability, and such disability benefits as determined in accordance with
any short or long-term disability plans then in effect for executives of the Bank. 
 (d) Compensation Upon Termination by the Bank for
Cause. In the event the Executive’s employment shall be terminated by the Bank for Cause as provided by Section 6(a) above, he shall be entitled to receive his Accrued Obligations only. 

(e) Compensation Upon Termination of the Bank Without Cause or by the Executive for Good Reason. In the event the Executive’s
employment shall be terminated by the Bank without Cause as provided in Section 6(c) above, or by the Executive for Good Reason as provided in Section 6(b) above, he shall be entitled to receive the Accrued Obligations. In addition,
subject to the Executive’s agreement to a release of any and all legal claims in a form satisfactory to the Bank and the expiration of the applicable revocation period and subject to compliance with the provisions of Section 9 hereof, the
Bank shall pay the Executive an amount equivalent to the sum of (i) two (2) times the Executive’s Salary at the rate then in effect pursuant to Section 4(a); and (ii) the value of 24 months of health insurance premiums for
health insurance coverage provided by the Bank, based on the coverage provided to the Executive immediately prior to his termination. The Bank shall make this in a single lump sum cash payment within ten (10) days following the termination of
employment, provided, however, if Executive is a “specified employee” (as defined below) of a publicly traded company, the payment may be delayed and paid to the Executive on the first day of the seventh month following termination of
employment if required to avoid penalty under Section 409A of the Internal Revenue Code (“Code”). For purposes of this Section 7(e), the Executive shall not have a “termination of employment” until he has a
“separation from service” within the meaning of Code Section 409A and the regulations promulgated thereunder. Also for purposes of this Section 7(e), Executive is a specified employee if Executive is a “key employee”
within the meaning of Code Section 416(i) (without regard to paragraph (i) thereof). The form of release referenced above is annexed hereto as Exhibit A. 

(f) No mitigation. To the extent that the Executive receives any payments pursuant to this Section 7, he shall not be required to seek to mitigate
any such payments by seeking other employment, and the Bank shall not be entitled to offset any income earned by the Executive following his termination against any money owed to the Executive to the Bank pursuant to this Section 7. 

8. Termination in Connection with a Change in Control. 

(a) For purposes of this Agreement, a “Change in Control” means a change in control of the Bank or Meridian Bancorp, Inc., a
Maryland corporation, (the “Company”) as defined in Section 409A of the Internal Revenue Code of 1986 (the “Code”), as amended, and rules, regulations, and guidance of general application thereunder, including the following:

  
 6 

 i. Change in ownership: A change in ownership of the Bank or the Company
occurs on the date any one person or group of persons accumulates ownership of more than 50% of the total fair market value or total voting power of the Bank or the Company; or 

ii. Change in effective control: A change in effective control occurs when either (i) any one person or more than
one person acting as a group acquires within a 12-month period ownership of stock of the Company possessing 30% or more of the total voting power of the Company; or (ii) a majority of the Bank’s or Company’s Board of Directors is
replaced during any 12-month period by Directors whose appointment or election is not endorsed in advance by a majority of the Bank’s or Company’s Board of Directors (as applicable), or 

iii. Change in ownership of a substantial portion of assets: A change in the ownership of a substantial portion of the
Company’s assets occurs if, in a 12 month period, any one person or more than one person acting as a group acquires assets from the Company having a total gross fair market value equal to or exceeding 40% of the total gross fair market value of
the Company’s entire assets immediately before the acquisition or acquisitions. For this purpose, “gross fair market value” means the value of the Company’s assets, or the value of the assets being disposed of, determined without
regard to any liabilities associated with the assets. 
 (b) Termination. If within the period ending one year after
a Change in Control, (i) the Bank terminates the Executive’s employment without Cause, or (ii) the Executive voluntarily terminates his employment with Good Reason, the Bank will, within ten (10) calendar days of the termination
of the Executive’s employment, make a lump-sum cash payment to him equal to 2.99 times his “base amount” (as defined for purposes of Section 280G of the Code) less any other “parachute
payments” (as also defined for purposes of Section 280G of the Code) made to the Executive. The cash payment made under this Section 8(b) shall be made in lieu of any payment also required under Section 7 of this Agreement
because of the Executive’s termination of employment. For purposes of this Section 8)(b), the Executive shall not have a “termination of employment” until he has a “separation from service” within the meaning of
Section 409A of the Internal Revenue Code (“Code”) and the regulations promulgated thereunder. 
 (c) The
provisions of Section 9 , including the defined terms used in such sections, shall continue in effect until the later of the expiration of this Agreement or one year following a Change in Control, except the non-compete provisions in
Section 9(d) shall not be applicable in the event of a Change in Control. 

  
 7 

 (d) Limitation of Benefits Under Certain Circumstances. If the payments and benefits
pursuant to this Section 8 of this Agreement, either alone or together with other payments and benefits the Executive has the right to receive from the Bank, would constitute a “parachute payment” under Section 280G of the Code,
the payments and benefits shall be reduced or revised, by the amount, if any, which is the minimum necessary to result in no portion of the payments and benefits under this Agreement or otherwise being non-deductible to the Bank pursuant to
Section 280G of the Code and subject to the excise tax imposed under Section 4999 of the Code. The reduction will be made in the manner determined by the Executive, unless it is determined that permitting the Executive to make the
determination would violate Code Section 409A. In such case, the reduction will be made first from the cash severance payment payable under this Section 8. The Bank’s independent public accountants will determine any reduction
in the payments and benefits to be made pursuant to this Agreement or otherwise; the Bank will pay for the accountant’s opinion. If the Bank and/or the Executive do not agree with the accountant’s opinion, the Bank will pay to the
Executive the maximum amount of payments and benefits pursuant to this Section 8, as selected by the Executive, that the opinion indicates have a high probability of not causing any of the payments and benefits to be non-deductible to the Bank
and subject to the excise tax imposed under Section 4999 of the Code. The Bank may also request, and the Executive has the right to demand that the Bank request, a ruling from the Internal Revenue Service (“IRS”) as to whether the
disputed payments and benefits pursuant to this Section 8 have such tax consequences. The Bank will promptly prepare and file the request for a ruling from the IRS, but in no event will the Bank make this filing later than thirty (30) days
from the date of the accountant’s opinion referred to above. The request will be subject to the Executive’s approval prior to filing; the Executive shall not unreasonably withhold his approval. The Bank and the Executive agree to be bound
by any ruling received from the IRS and to make appropriate payments to each other to reflect any IRS rulings, together with interest at the applicable federal rate provided for in Section 7872(f)(2) of the Code. Nothing contained in this
Agreement shall result in a reduction of any payments or benefits to which the Executive may be entitled upon termination of employment other than pursuant to this Section 8, or a reduction in the payments and benefits specified in this
Section 8, below zero. 
 9. Confidential Information, Noncompetition and Cooperation. 

(a) Confidential Information. As used in this Agreement, “Confidential Information” means information belonging to the Bank
which is of value to the Bank in the course of conducting its business and the disclosure of which could result in a competitive or other disadvantage to the Bank. Confidential Information includes, without limitation, financial information,
reports, and forecasts; inventions, improvements and other intellectual property; trade secrets; know-how; designs, processes or formulae; software; market or sales information or plans; customer lists; and business plans, prospects and
opportunities (such as possible acquisitions or dispositions of businesses or facilities) which have been discussed or considered by the management of the Bank. Confidential Information includes information developed by the Executive in the course
of the Executive’s employment by the Bank, as well as other information to which the Executive may have access in connection with the Executive’s employment. Confidential Information also includes the confidential information of others
with which the 

  
 8 

 
Bank has a business relationship. Notwithstanding the foregoing, Confidential Information does not include information in the public domain, unless due to breach of the Executive’s duties
under Section 9(b). 
 (b) Confidentiality. The Executive understands and agrees that the Executive’s employment creates a
relationship of confidence and trust between the Executive and the Bank with respect to all Confidential Information. At all times, both during the Executive’s employment with the Bank and after its termination, the Executive will keep in
confidence and trust all such Confidential Information, and will not use or disclose any such Confidential Information without the written consent of the Bank, except as may be necessary in the ordinary course of performing the Executive’s
duties to the Bank. 
 (c) Documents, Records, etc. All documents, records, data, apparatus, equipment and other physical property,
whether or not pertaining to Confidential Information, which are furnished to the Executive by the Bank or are produced by the Executive in connection with the Executive’s employment will be and remain the sole property of the Bank. The
Executive will return to the Bank all such materials and property as and when requested by the Bank. In any event, the Executive will return all such materials and property within ten business days of the termination of the Executive’s
employment for any reason. The Executive will not retain with the Executive any such material or property or any copies thereof after such termination except for a copy of his personnel file and any documents pertaining to his termination of
employment. 

  
 9 

 (d) Noncompetition and Nonsolicitation. During the period in which the Executive is
employed by the Bank and for two (2) years thereafter, the Executive (i) will not, directly or indirectly, whether as owner, partner, shareholder, consultant, agent, employee, co-venturer or otherwise, engage, participate, assist or invest
in any Competing Business (as hereinafter defined); (ii) will refrain from directly or indirectly employing, attempting to employ, recruiting or otherwise soliciting, inducing or influencing any person to leave employment with the Bank (other
than terminations of employment of subordinate employees undertaken in the course of the Executive’s employment with the Bank); and (iii) will refrain from soliciting or encouraging any customer or supplier to terminate or otherwise modify
adversely its business relationship with the Bank. Notwithstanding the foregoing, in the event that the Bank terminates the Executive with Cause, or the Executive terminates his employment other than for Good Reason, the restrictions in subsection
(d)(i) will not apply to the Executive. The intent of the parties is to avoid restricting the ability of the Executive to obtain other employment if his employment with the Bank terminates and he is not being paid during the period of the
noncompetition obligation. The Executive understands that the restrictions set forth in this Section 9(d) are intended to protect the Bank’s interest in its Confidential Information and established employee, customer and supplier
relationships and goodwill, and agrees that such restrictions are reasonable and appropriate for this purpose. For purposes of this Agreement, the term “Competing Business” shall mean a business conducted anywhere in Suffolk, Middlesex,
Essex and Norfolk Counties, or within a 30-mile radius of the Bank’s headquarters (other than the State of New Hampshire), which is competitive with any business which the Bank or any of its affiliates conducts or proposes to conduct at any
time during the employment of the Executive. Notwithstanding the foregoing, the Executive may own up to one percent (1%) of the outstanding stock of a publicly held corporation which constitutes or is affiliated with a Competing Business and
may serve on the Board of Directors of the entities listed on Appendix B. 
 (e) Litigation and Regulatory Cooperation. During and
after the Executive’s employment, the Executive shall cooperate fully with the Bank in the defense or prosecution of any claims or actions now in existence or which may be brought in the future against or on behalf of the Bank which relate to
events or occurrences that transpired while the Executive was employed by the Bank. The Executive’s full cooperation in connection with such claims or actions shall include, but not be limited to, being available to meet with counsel to prepare
for discovery or trial and to act as a witness on behalf of the Bank at mutually convenient times. During and after the Executive’s employment, the Executive also shall cooperate fully with the Bank in connection with any investigation or
review of any federal, state or local regulatory authority as any such investigation or review relates to events or occurrences that transpired while the Executive was employed by the Bank. The Bank shall reimburse the Executive for any reasonable
out-of-pocket expenses incurred in connection with the Executive’s performance of obligations pursuant to this Section 9(e). 

(f) Injunction. The Executive agrees that it would be difficult to measure any damages caused to the Bank which might result from any
breach by the Executive of the promises set forth in this Section 9, and that in any event money damages would be an inadequate remedy for any such breach. Accordingly, subject to Section 10 of this Agreement, the Executive agrees that if
the Executive breaches, or proposes to breach, any portion of this 

  
 10 

 
Agreement, the Bank shall be entitled, in addition to all other remedies that it may have, to seek an injunction or other appropriate equitable relief to restrain any such breach without showing
or proving any actual damage to the Bank. 
 10. Arbitration of Disputes. Any controversy or claim arising out of or relating to this
Agreement or the breach thereof or otherwise arising out of the Executive’s employment or the termination of that employment (including, without limitation, any claims of unlawful employment discrimination whether based on age or otherwise)
shall, to the fullest extent permitted by law, be settled by binding arbitration under the auspices of JAMS (Judicial Arbitration and Mediation Service), One Beacon Street, Boston, Massachusetts in accordance with the Employment Arbitration Rules
and Procedures Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction thereof. This Section 10 shall be specifically enforceable. Notwithstanding the foregoing, this Section 10 shall not preclude
either party from pursuing a court action for the sole purpose of obtaining a temporary restraining order or a preliminary injunction in circumstances in which such relief is appropriate; provided that any other relief shall be pursued through an
arbitration proceeding pursuant to this Section 10, and the arbitrator shall have the power to revoke, revise, or otherwise modify any preliminary ruling by a court. The cost of all arbitration proceedings shall be paid equally by the parties.
Each party shall initially bear his or its own attorney’s fees in connection with any arbitration, but the arbitrator shall have the power to allocate the final payment of legal fees so as to do substantial justice. 

11. Consent to Jurisdiction. To the extent that any court action is permitted consistent with or to enforce Section 10 of this
Agreement, the parties hereby consent to the jurisdiction of the Superior Court of the Commonwealth of Massachusetts and the United States District Court for the District of Massachusetts. Accordingly, with respect to any such court action, the
Executive (a) submits to the personal jurisdiction of such courts; (b) consents to service of process; and (c) waives any other requirement (whether imposed by statute, rule of court, or otherwise) with respect to personal
jurisdiction or service of process. 
 12. Integration. This Agreement constitutes the entire agreement between the parties with
respect to the subject matter hereof and supersedes all prior agreements between the parties with respect to any related subject matter. 

13. Assignment; Successors and Assigns, etc. Neither the Bank nor the Executive may make any assignment of this Agreement or any
interest herein, by operation of law or otherwise, without the prior written consent of the other party; provided that the Bank may assign its rights under this Agreement without the consent of the Executive in the event that the Bank shall effect a
reorganization, consolidate with or merge into any other corporation, partnership, organization or other entity, or transfer all or substantially all of its properties or assets to any other corporation, partnership, organization or other entity. In
the event of such assignment, the Bank will require the reorganized, consolidated, or merged entity to assume the Bank’s obligations to the Executive pursuant to this Agreement, and to recognize that the Executive is a third-party beneficiary
of any such action.This Agreement shall inure to the benefit of and be binding upon the Bank and the Executive, their respective successors (whether in the case of the Bank by merger or otherwise), executors, administrators, heirs and permitted
assigns. 

  
 11 

 14. Enforceability. If any portion or provision of this Agreement (including, without
limitation, any portion or provision of any section of this Agreement) shall to any extent be declared illegal or unenforceable by a court of competent jurisdiction, then the remainder of this Agreement, or the application of such portion or
provision in circumstances other than those as to which it is so declared illegal or unenforceable, shall not be affected thereby, and each portion and provision of this Agreement shall be valid and enforceable to the fullest extent permitted by
law. 
 15. Indemnification. In the event that the Executive is sued for any actions arising out of or relating to his employment
with the Bank, the Bank will indemnify the Executive and hold him harmless against any money damages which the Executive is ordered to pay as a result of the litigation, and will indemnify the Executive for his reasonable attorney’s fees
incurred in connection with the defense of any such action by paying the Executive’s reasonable attorney’s fees on an ongoing basis until the claim or litigation is resolved. 

16. Waiver. No waiver of any provision hereof shall be effective unless made in writing and signed by the waiving party. The failure of
any party to require the performance of any term or obligation of this Agreement, or the waiver by any party of any breach of this Agreement, shall not prevent any subsequent enforcement of such term or obligation or be deemed a waiver of any
subsequent breach. 
 17. Notices. Any notices, requests, demands and other communications provided for by this Agreement shall be
sufficient if in writing and delivered in person or sent by a nationally recognized overnight courier service or by registered or certified mail, postage prepaid, return receipt requested, to the Executive at the last address the Executive has filed
in writing with the Bank or, in the case of the Bank, at its main offices, attention of the Board of Directors, and shall be effective on the date of delivery in person or by courier or three (3) days after the date mailed. 

18. Amendment. This Agreement may be amended or modified only by a written instrument signed by the Executive and by a duly authorized
representative of the Bank. 
 19. Governing Law. This is a Massachusetts contract and shall be construed under and be governed in
all respects by the laws of the Commonwealth of Massachusetts, without giving effect to the conflict of laws principles of such Commonwealth. With respect to any disputes concerning federal law, such disputes shall be determined in accordance with
the law as it would be interpreted and applied by the United States Court of Appeals for the First Circuit. 
 20. Federal Deposit
Insurance Act Compliance. All payments made by the Bank to the Executive under any provision of this Agreement shall be subject to and conditioned upon compliance with Section 18(k) of the Federal Deposit Insurance Act, 12 U.S.C. §
1828(k) and any regulations promulgated hereunder. 

  
 12 

 21. Counterparts. This Agreement may be executed in any number of counterparts, each of
which when so executed and delivered shall be taken to be an original; but such counterparts shall together constitute one and the same document. 

22. Entire Agreement. This Agreement constitutes the entire agreement between the Bank and the Executive concerning the subject matter
hereof and supersedes the Original Agreement. No right is granted to the Executive under this Agreement other than those specifically set forth herein. No agreement or representation, oral or otherwise, expressed or implied, concerning the subject
matter of this Agreement has been made by either party that is not set forth expressly in this Agreement. 

  
 13 

 IN WITNESS WHEREOF, this Agreement has been executed as a sealed instrument by the Bank, by its
duly authorized officer, and by the Executive, as of the date first above written. 
  

			
	EAST BOSTON SAVINGS BANK
		
	By:	 	 /s/ Domenic A. Gambardella

		 	Duly Authorized
	
	EXECUTIVE
	
	 /s/ Richard J. Gavegnano

	Richard J. Gavegnano
	 Chairman of the Board, President and

Chief Executive OfficerEX-10.5

 Exhibit 10.5 

EAST BOSTON SAVINGS BANK 

AMENDED AND RESTATED 

EMPLOYEE SEVERANCE COMPENSATION PLAN 

This East Boston Savings Bank Amended and Restated Employee Severance Compensation Plan is dated this 28th day of July, 2014, by East Boston
Savings Bank, a corporation organized and existing under the laws of the Commonwealth of Massachusetts (the “Bank”). 

WITNESSETH 

WHEREAS, the Board of Directors of the Bank (the “Board”) adopted an employee severance compensation plan on April 21,
2008 (the “Original Plan”); and 
 WHEREAS, in connection with the conversion of Meridian Financial Services, Incorporated
(the “MHC”) from the mutual holding company to the stock holding company form of organization, the Bank desires to amend and restate the Original Plan in order to remove any reference to the MHC structure and to make certain other changes;
and 
 WHEREAS, the Original Plan may be amended by the Board. 

NOW, THEREFORE, effective April 21, 2008, the Bank hereby amends and restates the Original Plan in its entirety. 

 

	A.	Purpose. 

 The primary purpose of the East Boston Savings Bank Amended and
Restated Employee Severance Compensation Plan (the “Plan”) is to ensure the successful continuation of the business of the Bank and the fair and equitable treatment of the Bank’s employees following a Change in Control (as defined
below). 
  

	B.	Covered Employees. 

 Subject to paragraph C below, any employee of the Bank with
at least one year of service as of his or her termination date shall be eligible to receive a Change in Control Severance Benefit (as defined below) if, within the period beginning on the effective date of a Change in Control and ending on the first
anniversary of such date, (i) the employee’s employment with the Bank is involuntarily terminated or (ii) the employee terminates employment with the Bank voluntarily after being offered continued employment in a position that is not
a Comparable Position (as defined below). 
  

	C.	Limitations on Eligibility for Change in Control Severance Benefits or Management Restructuring Benefits. 

  

	 	(1)	No employee shall be eligible for a Change in Control Severance Benefit if (a) his or her employment is terminated for “Cause,” (b) he or she is offered a Comparable Position and declines to accept
such position, or (c) the employee is, at the time of termination of employment, a party to an individual employment agreement or change in control agreement with the Bank and/or Meridian Bancorp, Inc., a Maryland corporation (the
“Company”). 

	 	(2)	For purposes of this Plan, a termination of employment for “Cause” shall include termination because of the employee’s personal dishonesty, incompetence, willful misconduct, breach of fiduciary duty
involving personal profit, intentional failure to perform stated duties, willful violation of any law, rule, or regulation (other than traffic violations or similar offenses) or final cease-and-desist order, or material breach of any provision of
the Plan. 

  

	 	(3)	For purposes of this Plan, a “Comparable Position” shall mean a position that would (a) provide the employee with base compensation and benefits that are comparable in the aggregate to those provided to the
employee prior to the Change in Control; (b) provide the employee with an opportunity for variable bonus compensation that is comparable to the opportunity provided to the employee prior to the Change in Control; (c) be in a location that
would not require the employee to increase his or her daily one way commuting distance by more than thirty-five (35) miles as compared to the employee’s commuting distance immediately prior to the Change in Control; and (d) have job
skill requirements and duties that are comparable to the requirements and duties of the position held by the employee prior to the Change in Control. 

  

	D.	Definitions of Change in Control. 

 For purposes of this Plan, “Change in
Control” means the occurrence of any one of the following events: 
  

	 	(1)	Merger: The Company merges into or consolidates with another corporation, or merges another corporation into the Company, and as a result, less than a majority of the combined voting power of the resulting
corporation immediately after the merger or consolidation is held by persons who were stockholders of the Company immediately before the merger or consolidation; 

  

	 	(2)	Acquisition of Significant Share Ownership: A report on Schedule 13D or another form or schedule (other than Schedule 13G) is filed or required to be filed under Sections 13(d) or 14(d) of the Securities Exchange
Act of 1934, if the schedule discloses that the filing person or persons acting in concert has or have become the beneficial owner(s) of 25% or more of a class of the Company’s voting securities, but this clause (2) shall not apply to
beneficial ownership of Company voting shares held in a fiduciary capacity by an entity of which the Company directly or indirectly beneficially owns 50% or more of its outstanding voting securities; 

 

	 	(3)	Change in Board Composition: During any period of two consecutive years, individuals who constitute the Company’s Board of Directors at the beginning of the two-year period cease for any reason to constitute
at least a majority of the Company’s Board of Directors; provided, however, that for purposes of this clause (3), each director who is first elected by the Board of Directors (or first nominated by the Board of Directors for election by the
stockholders) by a vote of at least two-thirds ( 2⁄3) of the directors who were directors at the beginning of the two-year period shall be deemed to have also
been a director at the beginning of such period; or 

  

	 	(4)	Sale of Assets: The Company or the Bank sells to a third party all or substantially all of its assets. 

  
 2 

	E.	Determination of the Change in Control Severance Benefit. 

  

	 	(1)	The Change in Control Severance Benefit payable to an eligible employee under this Plan shall be determined under the following schedule: 

 

	 	(a)	An eligible employee who does not receive a benefit pursuant to paragraph (b) of this Section shall receive a Change in Control Severance Benefit equal to the product of (i) the employee’s years of
service from his or her hire date (including partial years) through the termination date and (ii) an amount equal to two (2) weeks of the employee’s Base Compensation (as defined below). A “year of service” shall mean each
12-month period of service following an employee’s hire date determined without regard the number of hours worked during such period(s). The minimum payment to an eligible employee under this paragraph shall be an amount equal to two
(2) weeks of Base Compensation and the maximum payment to an eligible employee shall be an amount equal to one hundred four (104) weeks of Base Compensation. 

 

	 	(b)	An eligible employee-officer designated by the Board of Directors prior to a Change in Control shall receive a Change in Control Severance Benefit equal to the greater of the benefit in paragraph E(1)(a) or fifty-two
(52) weeks of Base Compensation. 

  

	 	(c)	The Change in Control Severance Benefit shall be paid in a lump sum not later than five (5) business days after the date of the employee’s termination of employment. 

 

	 	(2)	For purpose of determinations under this paragraph E, “Base Compensation” shall mean: 

  

	 	(a)	For salaried employees, the employee’s annual base salary at the rate in effect on his or her termination date or, if greater, the rate in effect on the date immediately preceding the Change in Control.

  

	 	(b)	For employees whose compensation is determined in whole or in part on the basis of commission income, the employee’s base salary at termination (or, if greater, the employee’s base salary on the date
immediately preceding the effective date of the Change in Control), if any, plus the commissions earned by the employee in the twelve (12) full calendar months preceding his or her termination date (or, if greater, the commissions earned in the
twelve (12) full calendar months immediately preceding the effective date of the Change in Control). 

  

	 	(c)	For hourly employees, the employee’s total hourly wages for the twelve (12) full calendar months preceding his or her termination date or, if greater, the twelve (12) full calendar months preceding the
effective date of the Change in Control. 

  

	F.	Withholding. 

 All payments will be subject to customary withholding for federal,
state and local tax purposes. 

  
 3 

	G.	Parachute Payment. 

 Notwithstanding anything in this Plan to the contrary, if a
Change in Control Severance Benefit to an employee who is a “Disqualified Individual” shall be in an amount which includes an “Excess Parachute Payment,” taking into account payments under this Plan and otherwise, the benefit
payable under this Plan shall be reduced to the maximum amount which does not include an Excess Parachute Payment. The terms “Disqualified Individual” and “Excess Parachute Payment” shall have the same meanings as under
Section 280G of the Internal Revenue Code of 1986, as amended (the “Code”), or any successor provision thereto. 
  

	H.	Administration. 

 The Plan is administered by the Board of Directors, which shall
have the discretion to interpret the terms of the Plan and to make all determinations about eligibility and payment of benefits. All decisions of the Board of Directors, any action taken by the Board of Directors with respect to the Plan and within
the powers granted to the Board of Directors under the Plan, and any interpretation by the Board of Directors of any term or condition of the Plan, are conclusive and binding on all persons, and will be given the maximum possible deference allowed
by law. The Board of Directors may delegate and reallocate any authority and responsibility with respect to the Plan. 
  

	I.	Source of Payments. 

 Unless otherwise determined by the Board of Directors, all
payments and benefits provided under this Agreement shall be paid solely by the Bank. Notwithstanding anything in this Agreement to the contrary, no provision of this Agreement shall be construed so as to result in the duplication of any payment or
benefit. 
  

	J.	Inalienability. 

 In no event may any Employee sell, transfer, anticipate, assign
or otherwise dispose of any right or interest under the Plan. At no time will any such right or interest be subject to the claims of creditors, nor liable to attachment, execution or other legal process. 

 

	K.	Governing Law. 

 The provisions of the Plan will be construed, administered and
enforced in accordance with the laws of the Commonwealth of Massachusetts, except to the extent that federal law applies. 
  

	L.	Severability. 

 If any provision of the Plan is held invalid or unenforceable, its
invalidity or unenforceability will not affect any other provision of the Plan, and the Plan will be construed and enforced as if such provision had not been included. 
  

	M.	No Employment Rights. 

 Neither the establishment nor the terms of this Plan shall
be held or construed to confer upon any employee the right to a continuation of employment by the Bank, nor constitute a contract of employment, express or implied. The Bank reserves the right to dismiss or otherwise deal with any employee to the
same extent and on the same basis as though this Plan had not been adopted. Nothing in this Plan is intended to alter the at-will status of the Bank’s employees, it being understood that, except to

  
 4 

 
the extent otherwise expressly set forth to the contrary in an individual employment-related agreement, the employment of any employee may be terminated at any time by either the Bank or the
employee with or without cause. 
  

	N.	Amendment and Termination. 

 The Plan may be terminated or amended in any respect
by resolution adopted by a majority of the Board of Directors, unless a Change in Control has previously occurred. If a Change in Control occurs, the Plan no longer shall be subject to amendment, change, substitution, deletion, revocation or
termination in any respect whatsoever. The form of any proper amendment or termination of the Plan shall be a written instrument signed by a duly authorized officer or officers of the Bank, certifying that the amendment or termination has been
approved by the Board of Directors. A proper amendment of the Plan automatically shall effect a corresponding amendment to each Participant’s rights hereunder. A proper termination of the Plan automatically shall effect a termination of all
employees’ rights and benefits hereunder. 
  

	O.	Required Provisions. 

  

	 	(1)	In the event any of the provisions of this Section P are in conflict with the terms of this Plan, this Section P shall prevail. 

  

	 	(2)	The Bank’s Board of Directors may terminate an employee’s employment at any time, but any termination by the Bank, other than termination for Cause, shall not prejudice an employee’s right to compensation
or other benefits under this Plan. An employee shall not have the right to receive compensation or other benefits for any period after Termination for Cause. 

  

	 	(3)	Any payments made to employees pursuant to this Plan, or otherwise, are subject to and conditioned upon their compliance with 12 U.S.C. §1828(k) and FDIC regulation 12 C.F.R. Part 359, Golden Parachute and
Indemnification Payments. 

  

	 	(4)	An employee shall not have a “termination of employment” until he or she has a “separation from service” within the meaning of Section 409A of the Code and the regulations promulgated
thereunder. If an employee is a “specified employee,” the payment may be delayed and paid to the employee on the first day of the seventh month following termination of employment if required to avoid penalty under Section 409A of the
Code. 

  
 5

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00237-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00237-of-00352.parquet"}]]