Exhibit 5.1

September 2, 2022
|
Northwest Pipe Company |
Ladies and Gentlemen:
SM “Open Market Sale Agreement” is a service mark of Jefferies LLC

Northwest Pipe Company
September 2, 2022
Page 2
We have also assumed that at the time of the sale of the Shares (i) the Company will continue to be incorporated and in existence and good standing in its jurisdiction of organization, (ii) all Shares will be issued and sold in accordance with the Sales Agreement, in compliance with applicable federal and state securities laws, and in the manner stated in the Registration Statement, the Prospectus and any applicable prospectus supplement, (iii) the resolutions of the board of directors of the Company, as reflected in the minutes and proceedings of the Company, will not have been modified or rescinded, (iv) the Prospectus Supplement and any required pricing supplement will have been filed with the Securities and Exchange Commission describing the Shares offered thereby, (v) there will be sufficient shares of Common Stock authorized under the Company’s certificate of incorporation and not otherwise reserved for issuance and (vi) there will not have occurred any change in the laws affecting the authorization, issuance, sale or validity of the Shares.
Based on the foregoing and subject to the qualifications set forth herein, as of the date hereof, we are of the opinion that, following (i) issuance of the Shares pursuant to the terms of the Sales Agreement, and (ii) receipt by the Company of the consideration for the Shares specified in the Sales Agreement, the Shares will be validly issued, fully paid, and nonassessable.
Our opinion is limited to the matters set forth herein, and we express no opinion other than as expressly set forth herein. In rendering the opinion set forth above, we do not express any opinion concerning laws other than the Federal securities laws of the United States and the laws of the State of Oregon. We are expressing no opinion as to the effect of the laws of any other jurisdiction or the securities or “blue sky” laws of any jurisdiction (except federal securities laws). Our opinion is expressed as of the date hereof and is based on laws currently in effect. Accordingly, the conclusions set forth in this opinion are subject to change in the event that any laws should change or be enacted in the future. We are under no obligation to update this opinion or to otherwise communicate with you in the event of any such change.
We hereby consent to the reference to our firm under the heading “Legal Matters” in the Prospectus. We also hereby consent to the filing of this opinion with the Securities and Exchange Commission as an exhibit to the Company’s Current Report on Form 8‑K being filed on the date hereof and incorporated by reference into the Registration Statement. In giving this consent, we do not thereby admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations thereunder.

Northwest Pipe Company
September 2, 2022
Page 3
Very truly yours,
/s/ BUCHALTER
BUCHALTER
A Professional Corporation