EXHIBIT 5.1


                                February 6, 2004

Sanmina-SCI Corporation
2700 North First Street
San Jose, CA 95134

      RE:   REGISTRATION STATEMENT ON FORM S-8

Ladies and Gentlemen:

      We have examined the Registration Statement on Form S-8 to be filed by you
with the Securities and Exchange Commission on or about February 6, 2004 (the
"Registration Statement") in connection with the registration under the
Securities Act of 1933, as amended (the "Act") of 12,000,000 shares of Common
Stock available for issuance under your 1999 Stock Plan (the "Plan" and
"Shares"). As your counsel in connection with this transaction, we have examined
the proceedings taken and are familiar with the proceedings proposed to be taken
by you in connection with the issuance and sale of the Shares pursuant to the
Plan.

      It is our opinion that the Shares, when issued and sold in the manner
referred to in the Plan and the agreements which accompany the Plan, will be
legally and validly issued, fully paid and nonassessable.

      We consent to the use of this opinion as an exhibit to the Registration
Statement, and consent to the use of our name wherever appearing in the
Registration Statement, including the Prospectus constituting a part thereof,
and any amendments thereto.

                                            Very truly yours,

                                            WILSON SONSINI GOODRICH & ROSATI
                                            Professional Corporation

                                            /s/ Wilson Sonsini Goodrich & Rosati