1

                                                                     EXHIBIT 5.1

                                  May 14, 2001



KLA-Tencor Corporation
160 Rio Robles
San Jose, California 95134

         RE: REGISTRATION STATEMENT ON FORM S-8

Ladies and Gentlemen:

         I have examined the Registration Statement on Form S-8 to be filed by
KLA-Tencor Corporation (the "Company") with the Securities and Exchange
Commission on or about May 14, 2001 (the "Registration Statement") in connection
with the registration under the Securities Act of 1933, as amended, of an
aggregate of 5,600,000 shares of the Company's Common Stock (the "Shares") under
the Company's 2000 Nonstatutory Stock Option Plan (the "Plan"). As legal
counsel, I have examined the proceedings taken and am familiar with the
proceedings proposed to be taken by the Company in connection with the issuance
and sale of the Shares pursuant to the Plan.

         It is my opinion that, when issued and sold in the manner referred to
in the Plan and pursuant to the agreements which accompany the Plan, the Shares
will be legally and validly issued, fully-paid and non-assessable.

         I consent to the use of this opinion as an exhibit to the Registration
Statement and further consent to the use of my name wherever appearing in the
Registration Statement and any amendments thereto.

                                     Sincerely,

                                     /s/ Stuart J. Nichols
                                     --------------------------------
                                     Stuart J. Nichols, Vice President and
                                     General Counsel
                                     KLA-Tencor Corporation