
                                                                       EXHIBIT 5

                                November 5, 1998


Benchmark Electronics, Inc.
3000 Technology Drive
Angleton, Texas 77515

Ladies and Gentlemen:

We have acted as counsel to Benchmark Electronics, Inc., a Texas corporation
(the "Company"), in connection with the proposed issuance by the Company of up
to an additional 1,000,000 shares (the "Shares") of Common Stock, par value $.10
per share, upon the exercise of options granted to employees of the Company
pursuant to the terms of the Company's Stock Option Plan, as amended (the
"Plan"). The Company previously has filed with the Securities and Exchange
Commission (the "Commission") under the Securities Act of 1933, as amended, a
Registration Statement on Form S-8 (Registration No. 33-61660) relating to
300,000 shares of Common Stock subject to the Plan and a Registration Statement
on Form S-8 (Registration No. 333-26805) relating to 800,000 shares of Common
Stock subject to the Plan. The Company now is filing a third Registration
Statement on Form S-8 relating to the Shares (the "Registration Statement").

We have examined originals or copies of (i) the Restated Articles of
Incorporation of the Company, (ii) the Amended and Restated Bylaws of the
Company, (iii) the Plan, (iv) certain resolutions of the Board of Directors of
the Company and (v) such other documents and records as we have deemed necessary
and relevant for purposes hereof. In addition, we have relied on certificates of
officers of the Company as to certain matters of fact relating to this opinion
and have made such investigations of law as we have deemed necessary and
relevant as a basis hereof.

We have assumed the genuineness of all signatures, the authenticity of all
documents, certificates and records submitted to us as originals, the conformity
to original documents, certificates and records of all documents, certificates
and records submitted to us as copies, and the truthfulness of all statements of
fact contained therein.


<PAGE>
Benchmark Electronics, Inc.
November 5, 1998
Page 2


Based upon the foregoing and subject to the limitations and assumptions set
forth herein and having due regard for such legal considerations as we deem
relevant, we are 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 a consideration at least equal to the par value thereof, will be
validly issued, fully paid and nonassessable.

The foregoing opinion is based on and is limited to the law of the State of
Texas and the relevant law of the United States of America, and we render no
opinion with respect to the law of any other jurisdiction. We hereby consent to
the filing of this opinion with the Commission as Exhibit 5 to the Registration
Statement.


                                    Very truly yours,

                                    /s/ BRACEWELL & PATTERSON, L. L. P.

                                    Bracewell & Patterson, L.L.P.



