THIRD AMENDMENT TO CREDIT AGREEMENT


                  THIS THIRD AMENDMENT TO CREDIT  AGREEMENT  (this  "Amendment")
dated as of January 31, 1997,  is entered into among  Komag,  Incorporated  (the
"Borrower"),  the several financial  institutions  party to the Credit Agreement
(collectively,  the "Banks"), Wells Fargo Bank, N.A. as agent for the Banks (the
"Agent"),  and as successor in interest to First  Interstate  Bank of California
("FICAL"),  as the  original  agent (the  "Prior  Agent") for the Banks and as a
Bank.


                                    RECITALS

                  A. The Borrower,  the Prior Agent,  and the Banks have entered
into a Credit  Agreement  dated as of December 15, 1994, as amended prior to the
date hereof (the "Credit Agreement"), pursuant to which the Prior Agent, and the
Banks agreed to make available to the Borrower a revolving credit facility.

                  B. Prior to the date hereof, Wells Fargo Bank, N.A. became the
successor  in  interest  to FICAL as Prior  Agent and as a Bank under the Credit
Agreement and the other Loan Documents.

                  C. The  Borrower  has  requested  that the Agent and the Banks
amend the Credit Agreement as hereinafter  provided,  and the parties hereto are
willing to so amend the Credit Agreement  subject to the terms and conditions of
this Amendment.


                                   AGREEMENTS

                  NOW,  THEREFORE,  in  consideration  of the  premises  and the
mutual promises herein contained, the parties hereto agree as follows:

                  1. Capitalized Terms. Capitalized terms used in this Amendment
and not otherwise  defined shall have the  respective  meanings set forth in the
Credit Agreement.

                  2. Amendments.

                         (a)  In  the  introductory   paragraph  of  the  Credit
Agreement, the phrase "First Interstate Bank of California, a California banking
corporation  ("FICAL")"  shall be deleted and the following  phrase "Wells Fargo
Bank, N.A., a national association" shall be inserted in lieu thereof.

<PAGE>

                         (b) All  references  in the  Credit  Agreement  and the
other Loan Documents to "FICAL" shall be amended to refer to "Wells Fargo".  All
other  references in the Credit Agreement and the other Loan Documents to "First
Interstate  Bank of California"  shall be amended to refer to "Wells Fargo Bank,
N.A.".

                         (c) The term "Banks" in the  introductory  paragraph of
the Credit  Agreement is amended to refer to all Banks  executing this Amendment
and all of the duties and  obligations  of the Borrower under the Loan Documents
in  existence  prior to the  date  hereof  shall  be  deemed  to be  duties  and
obligations to the Agent and the Banks executing this Amendment.

                         (d) In Section 1.01 of the Credit Agreement,  the prior
definition of "FICAL", now "Wells Fargo", shall be realphabetized.

                         (e) Section 6.02(f) to the Credit  Agreement is amended
by deleting  the amount  "$100,000,000"  wherever it appears and by inserting in
lieu thereof the amount  "$300,000,000" and by deleting the amount "$50,000,000"
wherever it appears and by inserting in lieu thereof the amount  "$200,000,000";
provided,  that, no amendments  are made with respect to clause (vii) of Section
6.02(f).

                         (f) All notices  sent  pursuant to Section  9.02 of the
Credit  Agreement  shall be sent to the addresses  noted on the signature  pages
hereto.

                         (g)  Exhibit 4 to the Credit  Agreement  is deleted and
the form of Exhibit 4 attached hereto shall be inserted in lieu thereof.

                  3. Effective Date. This Amendment will become effective on the
date  ("Effective  Date") that the Agent has received  from the Borrower and the
Majority Banks a fully executed copy of this Amendment.

                  4. Miscellaneous.

                         (a) All references to Loan Documents shall refer to the
Loan  Documents as amended by this  Amendment.  This  Amendment  shall be deemed
incorporated into, and a part of, the Loan Documents.

                         (b) This  Amendment  shall be binding upon and inure to
the benefit of the parties  hereto and thereto and their  respective  successors
and assigns.  No third party  beneficiaries are intended in connection with this
Amendment.

                         (c) This  Amendment  shall be governed by and construed
in accordance  with the internal laws of the State of California  without regard
to the principles of conflicts of laws.


                                       2
<PAGE>

                         (d) This  Amendment  may be  executed  in any number of
counterparts,  each  of  which  shall  be  deemed  an  original,  but  all  such
counterparts together shall constitute but one and the same instrument.  Each of
the parties  hereto  understands  and agrees that this  Amendment (and any other
document  required  herein) may be delivered by any party thereto  either in the
form  of an  executed  original  or  an  executed  original  sent  by  facsimile
transmission  to be followed  promptly by mailing of a hard copy  original,  and
that  receipt  by the  Agent of a  facsimile  transmitted  document  purportedly
bearing the  signature  of the Borrower or any Bank will have the same force and
effect as the  delivery  of a hard copy  original.  Any  failure by the Agent to
receive the hard copy executed  original of such document shall not diminish the
binding effect of receipt of the facsimile transmitted executed original of such
document of the party whose hard copy page was not received by the Agent.

                         (e) This  Amendment  contains the entire and  exclusive
agreement of the parties hereto with reference to the matters  discussed  herein
and therein.  This Amendment supersedes all prior drafts and communications with
respect thereto. This Amendment may not be amended except in accordance with the
provisions of the Credit Agreement.

                         (f) If any term or provision of this Amendment shall be
deemed  prohibited by or invalid under any applicable  law, such provision shall
be invalidated  without affecting the remaining  provisions of this Amendment or
the Loan Documents, respectively.


                                       3.
<PAGE>

                  IN WITNESS  WHEREOF,  the  parties  hereto  have  caused  this
Amendment  to be  executed by their duly  authorized  officers as of the day and
year first written above.


                                   KOMAG INCORPORATED




                                   By:     /S/ William L. Potts, Jr.
                                      -----------------------------------------
                                   Title:  SVP, CFO
                                         ---------------------------------------

                                   Address:       Komag, Incorporated
                                                  275 South Hillview Drive
                                                  Milpitas, California 95035
                                   Facsimile:     (408) 956-1104




                                   WELLS  FARGO  BANK,   N.A.,   assuccessor  in
                                   interest   to   First   Interstate   Bank  of
                                   California, as Agent and as a Bank




                                   By:     /S/ Karen Barone
                                      -----------------------------------------
                                   Title:  Vice President
                                         ---------------------------------------

                                   Address:       121 Park Center Plaza
                                                  San Jose, CA 95172
                                   Facsimile:     (408) 295-0639


                                       4.
<PAGE>

                             COMERICA BANK - CALIFORNIA, as a Bank




                             By: /S/ Scott T. Smith
                                 -----------------------------------------------
                             Title:  Scott T. Smith, Assistant Vice President
                                     -------------------------------------------

                             Address:     333 West Santa Clara Street
                                          San Jose, CA 95113
                             Facsimile:   (408) 556-5292


                             STANDARD CHARTERED BANK, as a Bank




                             By:   /S/ Rita Raychaudhuri
                                   ---------------------------------------------
                             Title:  Vice President
                                    --------------------------------------------

                             Address:     707 Wilshire Blvd., W9
                                          Los Angeles, CA 90017
                             Facsimile:   (213) 614-5158


                                       5.
<PAGE>


                             ABN - AMRO BANK, N.V., San Francisco Branch




                             By:  /S/ Tom R. Wug
                                  ----------------------------------------------
                             Title: Group Vice President
                                    --------------------------------------------

                             By:  /S/ Bruce W. Swords
                                  ----------------------------------------------
                             Title: Vice President
                                    --------------------------------------------


                             Address:    101 California Street, Suite 4550
                                         San Francisco, CA 94111
                             Facsimile:  (415) 362-3524


<PAGE>

                                    EXHIBIT 4

                   SUBSIDIARIES AND CONSOLIDATED SUBSIDIARIES


                                                        Percentage of the
                                                        Borrower's Ownership
                                                        --------------------

1.     Komag Material Technology, Inc.                             55%

2.     Komag Technology Partners                                   50%

3.     Asahi Komag Co., Ltd.                                        0% *

4.     Komag Bermuda Ltd.                                         100%

5.     Komag Overseas Ltd.                                        100%

6.     Komag USA (Malaysia) Sdn                                     0% **

7.     Dastek Holding Company                                      60%

8.     Dastek (M) SDN BHD                                           0% ***

9.     Headway Technologies, Inc.                                  17% ****

10.    Asahi Komag (Thailand) Co., Ltd.                             0% *****

11.    Komag (Barbados) Ltd.                                      100%


*      The Borrower  owns 50% of Komag  Technology  Partners,  which owns 98% of
       Asahi Komag Co., Ltd.

**     Komag Bermuda Ltd.  (97%) and Komag  Overseas ltd. (3%) own 100% of Komag
       USA (Malaysia) Sdn.

***    Dastek Holding Company owns 100% of Dastek (M) SDN BHD.

****   The Borrower,  through Asahi Komag Co., Ltd.,  owns an additional 9.5% of
       Headway Technologies, Inc.

*****  Asahi Komag Co., Ltd. owns 100% of Asahi Komag (Thailand) Co., Ltd.