Exhibit 5.1

May 15, 2019

Board of Directors
Benchmark Electronics, Inc.

Ladies and Gentlemen:

I have acted as legal counsel to Benchmark Electronics, Inc., a Texas corporation (the “Company”), in connection with the Registration Statement on Form S-8 (the “Registration Statement”) filed by the Company with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended, relating to up to 4,823,698 common shares, par value $0.10 per share, of the Company (the “Shares”), which will be issued and issuable with respect to equity-based compensation awards granted pursuant to the terms of the Company’s 2019 Omnibus Incentive Compensation Plan (the “Plan”).

I have examined such corporate records, certificates and other documents that I considered necessary or appropriate for the purposes of this opinion. In such examination, I have assumed the genuineness of all signatures and the authenticity of all documents submitted to me as originals and the conformity to the originals of all documents submitted to me as copies.

I am admitted to practice in the State of Texas, and I express no opinion as to matters governed by any law other than the laws of the State of Texas.

Based upon the foregoing and subject to the limitations and assumptions set forth herein and having due regard for such legal considerations as I deemed relevant, I am of the opinion that the Shares have been duly and validly authorized and, when issued and paid for in accordance with the terms of the Plan, for consideration at least equal to the par value thereof, will be validly issued, fully paid and nonassessable.

I hereby consent to the filing of this opinion with the Commission as Exhibit 5.1 to the Registration Statement.

Very truly yours,
/s/ Victor Harris
Victor Harris
Associate General Counsel