Exhibit 5.1 ATER WYNNE LLP 222 S.W. Columbia, Suite 1800 Portland, Oregon 97201 (503)226-1191 (phone) (503)226-0079 (fax) October 28, 1999 Board of Directors Northwest Pipe Company 12005 N. Burgard Portland, OR 97203 Gentlemen: In connection with the registration of 300,000 shares of common stock, par value $.01 per share (the "Common Stock"), of Northwest Pipe Company, an Oregon corporation (the "Company"), under the Registration Statement on Form S-8 to be filed with the Securities and Exchange Commission on October 29, 1999, and the proposed offer and sale of the Common Stock pursuant to the terms of the Company's 1999 Employee Stock Purchase Plan (the "Plan") we have examined such corporate records, certificates of public officials and officers of the Company and other documents as we have considered necessary or proper for the purpose of this opinion. Based on the foregoing and having regard to legal issues which we deem relevant, it is our opinion that the shares of Common Stock to be offered pursuant to the Plan when such shares have been delivered against payment therefor as contemplated by the Plan, will be validly issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the above-mentioned registration statement. Very truly yours, /s/ Ater Wynne LLP Ater Wynne LLP