EX-5.1 3 ex-51toformsx4bfknlegalopi.htm EX-5.1
Exhibit 5.1
November 14, 2025
Heritage Financial Corporation
201 Fifth Avenue SW
Olympia, Washington 98501
Re: Registration Statement on Form S-4 of Heritage Financial Corporation
Ladies and Gentlemen:
This opinion is being rendered to you in connection with the filing by Heritage Financial Corporation, a Washington corporation (the “Company”), with the Securities and Exchange Commission (the “Commission”) of a registration statement on Form S-4 (the “Registration Statement”), pursuant to the Securities Act of 1933, as amended (the “Act”), relating to the registration of shares (the “Registered Shares”) of the Company’s common stock, no par value per share (“Common Stock”). The Registered Shares are to be issued pursuant to the terms of the Agreement and Plan of Merger, dated as of September 25, 2025 (the “Merger Agreement”), between the Company and Olympic Bancorp, Inc., a Washington corporation (“Olympic”), which provides for, among other things, the merger of Olympic with and into the Company with the Company surviving the merger (the “Merger”). The Registered Shares consist of shares of Common Stock issuable pursuant to the Merger Agreement in exchange for shares of Olympic’s: (i) Class A voting common stock, no par value per share and (ii) Class B non-voting common stock, no par value per share, outstanding at the effective time of the Merger. This opinion is being furnished in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Act.
We have made such legal and factual investigations as we deemed necessary for purposes of this opinion. We have examined originals or copies, certified or otherwise identified to our satisfaction, of: (a) the Registration Statement, including the exhibits thereto; (b) the Company’s Amended and Restated Articles of Incorporation, as amended and as currently in effect; (c) the Company’s Amended and Restated Bylaws, as amended and as currently in effect; (d) certain resolutions of the board of directors of the Company (the “Board”) ; and (e) such other certificates, statutes and other instruments and documents as were considered appropriate for purposes of the opinion hereafter expressed. In our investigation, we have assumed the genuineness of all signatures, the proper execution of all documents submitted to us as originals, the conformity to the original documents of all documents submitted to us as copies and the
Barack Ferrazzano
200 West Madison Street, Suite 3900 | Chicago, Illinois 60606
T. 312.984.3100 | F. 312.984.3150 | bfkn.com

Heritage Financial Corporation
November 14, 2025
Page 2
authenticity of the originals of such copies. As to matters of fact, we have relied upon representations of officers of the Company.
The opinion set forth herein is subject to the following assumptions, qualifications, limitations and exceptions being true and correct at or before the time of issuance of any Registered Shares offered pursuant to the Registration Statement: (a) the Company will have received consideration in an amount not less than the aggregate par value of such Registered Shares; (b) the Registration Statement, and any amendments thereto (including post-effective amendments), shall have been declared or become effective under the Act, and such effectiveness shall not have been terminated or rescinded; (c) a joint proxy statement/prospectus shall have been prepared, delivered and filed in compliance with the Act and the applicable rules and regulations thereunder describing the Registered Shares offered thereby; and (d) the Registered Shares shall have been sold in compliance with applicable U.S. federal and state securities laws and solely in the manner stated in the Registration Statement and the joint proxy statement/prospectus.
Based upon the foregoing, and subject to the qualifications, assumptions and limitations set forth herein, it is our opinion that each Registered Share will be validly issued, fully paid and non-assessable when (a) the Merger shall have been effected under the Washington Business Corporation Act; and (b) a certificate representing such Registered Share shall have been duly executed, countersigned, registered and delivered to the person entitled thereto or, if the Registered Share is to be issued in uncertificated form, the Company’s books shall reflect the issuance of such Registered Share to the person entitled thereto, in each case in accordance with the terms of the Merger Agreement.
We express no opinion concerning the laws of any jurisdiction other than the Washington Business Corporation Act.
We express no opinion with respect to any specific legal issues other than those explicitly addressed herein. We assume no obligation to update this opinion letter after the date that the Registration Statement is initially declared effective or otherwise advise you with respect to any facts or circumstances or changes in law that may occur or come to our attention after such date (even though the change may affect the legal conclusions stated in this opinion letter).
We hereby consent to the reference to our firm in the Registration Statement under the caption “Legal Matters” and to the inclusion of this opinion letter as an exhibit to the Registration Statement. In giving this consent, we do not admit that we are within the category

Heritage Financial Corporation
November 14, 2025
Page 3
of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission.
Very truly yours,
/s/ Barack Ferrazzano Kirschbaum &
Nagelberg LLP