Document:

<PAGE>
                                                                    EXHIBIT 10.7

                                 FIRST AMENDMENT
                                       TO
                                 NOTE AGREEMENT

         This First Amendment to Note Agreement (this "Amendment") is made and
entered into as of July 31, 2001, by and among Holly Corporation, a Delaware
corporation (the "Company"), John Hancock Mutual Life Insurance Company ("John
Hancock") and each Other Purchaser named in Annex 1 to that certain Note
Agreement, dated as of November 15, 1995, between the Company, John Hancock and
the Other Purchasers (the "Agreement").

                                    RECITALS:

         WHEREAS, the parties hereto (the "Parties") are parties to the
Agreement;

         WHEREAS, each capitalized term used and not otherwise defined herein
shall have the meaning ascribed to such term in the Agreement; and

         WHEREAS, the Parties desire to amend the Agreement to allow any
Restricted Subsidiary to change its corporate form.

                                   AGREEMENTS:

         NOW, THEREFORE, in consideration of the foregoing and the mutual
agreements set forth herein, together with other good and valuable
consideration, the sufficiency of which is hereby acknowledged, the Parties
agree as follows:

         1. Corporate Existence, Etc. Section 5D of the Agreement shall be
amended and restated in its entirety to read as follows:

                  "5D. CORPORATE EXISTENCE, ETC. Except as provided in paragraph
         6G of this Agreement and except that any Restricted Subsidiary may be
         liquidated (subject to paragraph 6D of this Agreement) or converted
         into a corporation, partnership or limited liability company, the
         Company will and will cause each Restricted Subsidiary to,

                        (i) at all times preserve and keep in full force and
         effect its existence as a corporation, partnership or limited liability
         company, as applicable,

                        (ii) at all times preserve and keep in full force and
         effect the rights and franchises material to the business of the
         Company and the Restricted Subsidiaries taken as a whole, and

                        (iii) qualify to do business in each jurisdiction
         where the failure to do so would have a material adverse effect on the
         business, condition (financial or other), Properties or operations of
         the Company and the Restricted Subsidiaries, taken as a whole."

<PAGE>

         2. "Subsidiary" Definition. The definition of "Subsidiary" set forth in
the Agreement shall be amended and restated in its entirety to read as follows:

         ""SUBSIDIARY" means any corporation, limited liability company or
         partnership organized under the laws of any state of the United States
         of America which conducts the major portion of its business in and
         makes the major portion of its sales to Persons located in the United
         States of America, more than fifty percent (50%) of the outstanding
         Voting Equity of which shall, at the time as of which any determination
         is being made, be owned by the Company either directly or through
         Subsidiaries."

         3. "Voting Stock" Definition. The definition of "Voting Stock" set
forth in the Agreement shall be amended and restated in its entirety to read as
follows:

         "VOTING EQUITY" means any ownership interests of a corporation or other
         entity whose holders are entitled under ordinary circumstances to vote
         for the election of directors or other persons performing similar
         functions of such entity (irrespective of whether at the time ownership
         interests of any other class or classes shall have or might have voting
         power by reason of the happening of any contingency).

         4. Subsidiaries. A new Section 11O is hereby added to the Agreement to
read in its entirety as follows:

                  "11O. SUBSIDIARIES. Throughout the Agreement, with respect to
         any reference to a Subsidiary, the following shall apply:

                        (i) any reference to a board of directors shall also
         refer to any other persons performing similar functions with respect to
         such Subsidiary;

                        (ii) any reference to stock of such Subsidiary shall
         also refer to membership interests with respect to a Subsidiary that is
         a limited liability company and partnership interests with respect to a
         Subsidiary that is a partnership;

                        (iii) any other reference to any person, position or
         other aspect of a corporation shall also refer to similar persons,
         positions and aspects of a limited liability company or partnership, as
         applicable, with respect to such Subsidiary."

         5. Conditions Precedent. The amendments to the Agreement set forth in
Sections 1, 2, 3 and 4 shall become effective, as of the date hereof, upon the
execution of this Amendment by each of the Required Holders.

         6. Agreement Otherwise Unchanged. Except as herein specifically
amended, the Agreement shall continue in full force and effect in accordance
with its terms.

                                        2

<PAGE>
         7. Governing Law. This Amendment shall be construed and enforced in
accordance with, and the rights of the Parties shall be governed by, the law of
the State of New York applicable to contracts made and to be performed therein.

         8. Counterparts. This Amendment may be executed in one or more
counterparts, all of which taken together shall constitute one and the same
instrument.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]

                                       3

<PAGE>

         IN WITNESS WHEREOF, the parties have executed this First Amendment to
Note Agreement on the date first indicated above.

                                             HOLLY CORPORATION

                                             By: /s/ STEPHEN J. McDONNELL
                                                --------------------------------
                                             Name: Stephen J. McDonnell
                                                  ------------------------------
                                             Title: VICE PRESIDENT - FINANCE &
                                                   -----------------------------
                                                    CORPORATE DEVELOPMENT
                                                   -----------------------------

                                             JOHN HANCOCK MUTUAL LIFE INSURANCE
                                             COMPANY

                                             By:
                                                --------------------------------
                                             Name:
                                                  ------------------------------
                                             Title:
                                                   -----------------------------

                                             JOHN HANCOCK VARIABLE LIFE
                                             INSURANCE COMPANY

                                             By: /s/ EUGENE X. HODGE, JR.
                                                --------------------------------
                                             Name: EUGENE X. HODGE, JR.
                                                  ------------------------------
                                             Title: AUTHORIZED SIGNATORY
                                                   -----------------------------

                                             JOHN HANCOCK LIFE INSURANCE COMPANY

                                             By: /s/ EUGENE X. HODGE, JR.
                                                --------------------------------
                                             Name: EUGENE X. HODGE, JR.
                                                  ------------------------------
                                             Title: MANAGING DIRECTOR
                                                   -----------------------------

                                             JEFFERSON PILOT FINANCIAL INSURANCE
                                             COMPANY

                                             By: /s/ ROBERT E. WHALEN
                                                --------------------------------
                                             Name:   Robert E. Whalen
                                                  ------------------------------
                                             Title:
                                                   -----------------------------

                                       S-l

Dallas: FIRST AMENDMENT TO NOTE AGREEMENT

<PAGE>

                                             THE PENN MUTUAL LIFE INSURANCE
                                             COMPANY

                                             By: /s/ TODD FOX
                                                --------------------------------
                                             Name: TODD FOX
                                                  ------------------------------
                                             Title: PORTFOLIO MANAGER
                                                   -----------------------------

                                             AIG LIFE INSURANCE COMPANY
                                             By:  AIG GLOBAL INVESTMENT CORP,
                                                  as investment advisor

                                             By: /s/ GERALD F. HERMAN
                                                --------------------------------
                                             Name: GERALD F. HERMAN
                                                  ------------------------------
                                             Title: VICE PRESIDENT
                                                   -----------------------------

                                             PAN-AMERICAN LIFE INSURANCE
                                             COMPANY

                                             By: /s/ LUIS INGLES, JR.
                                                --------------------------------
                                             Name: LUIS INGLES, JR., C.F.A.
                                                  ------------------------------
                                             Title: SENIOR VICE PRESIDENT-
                                                   -----------------------------
                                                    INVESTMENTS
                                                   -----------------------------
                                       S-2<PAGE>
                                                                   EXHIBIT 10.13

                                                                  CONFORMED COPY

                                 AMENDMENT NO. 3

AMENDMENT NO. 3 dated as of August 7, 2001 (this AMENDMENT NO. 3) between: HOLLY
CORPORATION, NAVAJO REFINING COMPANY, BLACK EAGLE, INC., NAVAJO CORP., NAVAJO
SOUTHERN, INC., NAVAJO NORTHERN, INC., LOREFCO, INC., NAVAJO CRUDE OIL
PURCHASING, INC., NAVAJO HOLDINGS, INC., HOLLY PETROLEUM, INC., NAVAJO PIPELINE
CO., LEA REFINING COMPANY, NAVAJO WESTERN ASPHALT COMPANY, and MONTANA REFINING
COMPANY, A PARTNERSHIP, as Borrowers and Guarantors, the BANKS listed on the
signature pages hereof, CANADIAN IMPERIAL BANK OF COMMERCE, as Administrative
Agent, CIBC INC. as Collateral Agent, FLEET NATIONAL BANK (formerly known as
Bank Boston Corp.), as Documentation Agent, GUARANTY BUSINESS CREDIT
CORPORATION, as Collateral Monitor, and CIBC WORLD MARKETS CORP., as Sole Lead
Arranger and Bookrunner.

WHEREAS

(A)      The parties hereto are party to an Amended and Restated Credit and
         Reimbursement Agreement dated as of April 14, 2000, as amended by
         Amendment No. 1 dated as of July 7, 2000 and Amendment No. 2 dated as
         of April 4, 2001 (as in effect on the date hereof, the CREDIT
         AGREEMENT), providing, subject to the terms and conditions thereof, for
         extensions of credit to be made by the Banks to the Borrowers in an
         aggregate principal or face amount not exceeding $100,000,000.

(B)      The Borrowers and the Guarantors wish to amend the Credit Agreement to
         be able to change the corporate form of any Borrower or Guarantor.

(C)      The Banks and Agents agree to amend the Credit Agreement in accordance
         with the provisions contained herein, and accordingly, the parties
         hereto hereby agree as follows:

DEFINITIONS

1.       Except as otherwise defined in this Amendment No. 3, terms defined in
the Credit Agreement are used herein as defined therein.

AMENDMENTS

2.       Subject to the satisfaction of the conditions precedent set forth in
Section 4 below, the Credit Agreement shall be amended as follows effective on
the date hereof.

A.       The definition of "Voting Stock" in Section 1.1 of the Credit Agreement
         is deleted in its entirety and replaced with:

         "VOTING STOCK means any ownership interests of a corporation or other
         entity whose holders are entitled under ordinary circumstances to vote
         for the election of directors or other persons performing similar
         functions of such entity (irrespective of whether at the

<PAGE>

         time ownership interests of any other class or classes shall have or
         might have voting power by reason of the happening of any
         contingency)."

B.       Section 5.4 of the Credit Agreement is deleted in its entirety and
         replaced as follows:

         "CONDUCT OF BUSINESS AND MAINTENANCE OF EXISTENCE

         5.4      The Company will continue, and will cause each of its
                  Restricted Subsidiaries to continue, to engage in business of
                  the same general type as now conducted by it or in any
                  directly related business, will preserve, renew and keep in
                  full force and effect, and will cause each of its Restricted
                  Subsidiaries to preserve, renew and keep in full force and
                  effect its existence as a corporation, partnership or limited
                  liability company and rights, privileges and franchises
                  necessary or desirable in the normal conduct of business;
                  except that any Restricted Subsidiary (the CONVERTED
                  RESTRICTED SUBSIDIARY) may be converted into another form of
                  corporation, partnership or limited liability company;
                  provided that at the time of such conversion (i) no Default or
                  Event of Default has occurred and is continuing, (ii) counsel
                  for such Converted Restricted Subsidiary delivers an opinion
                  to the Agents and the Banks to the effect of items 1 and 2 of
                  Exhibit B-1 and items 1, 2 and 3 of Exhibit B-2 with respect
                  to such Converted Restricted Subsidiary only, (iii) such
                  entity's jurisdiction of incorporation is a state within the
                  United States, (iv) the general partner, if any, of such
                  Converted Restricted Subsidiary, and any Subsidiary of the
                  Company owning any stock, membership interests or limited
                  partnership interests, as applicable, of such Converted
                  Restricted Subsidiary shall also be designated as a Restricted
                  Subsidiary pursuant to Section 5.17 and (v) 100% of the
                  ownership interests of such Converted Restricted Subsidiary
                  shall be owned, directly or indirectly, by the Company;
                  provided further that nothing contained in this Section shall
                  prohibit any transaction expressly permitted under Section
                  5.12 or alter the obligations of the Borrowers and Guarantors
                  under Section 5.17."

C.       A new Section 9.13 is added to the Credit Agreement as follows:

         "SUBSIDIARIES

         9.13 Throughout this Agreement, with respect to any reference to a
         Subsidiary, the following shall apply:

            (i)   any reference to a board of directors shall also refer to any
                  other persons performing similar functions with respect to
                  such Subsidiary;

            (ii)  any reference to stock of such Subsidiary shall also refer to
                  membership interests with respect to a Subsidiary that is a
                  limited liability company and partnership interests with
                  respect to a Subsidiary that is a partnership; and

            (iii) any other reference to any person, position or other aspect of
                  a corporation shall also refer to similar persons, positions
                  and aspects of a limited liability company or partnership, as
                  applicable, with respect to such Subsidiary."

                                                                          Page 2

<PAGE>

REPRESENTATIONS AND WARRANTIES

3. Each of the Borrowers and the Guarantors represents and warrants to the Banks
and the Agents that (unless specifically limited to an earlier date) the
representations and warranties set forth in Section 4 of the Credit Agreement
are true and complete on and as of the date hereof with the same force and
effect as if made on and as of such date, and as if each reference in said
Section 4 to "this Agreement" included reference to this Amendment No. 3.

CONDITIONS PRECEDENT

4. As provided in Section 2, the amendments to the Credit Agreement set forth in
said Section 2 shall become effective, as of the date hereof, upon the
satisfaction of the following conditions precedent:

A.       DOCUMENTS. The Administrative Agent shall have received the following
         documents, each of which shall be satisfactory to the Administrative
         Agent in form and substance:

         (1) Amendment No. 3. This Amendment No. 3 executed by each Borrower and
         Guarantor, each Agent and the Required Banks.

         (2) Other Documents. Such other documents as (i) any Agent or Bank or
         (ii) Freshfields Bruckhaus Deringer L.L.P., special New York counsel to
         the Administrative Agent, may reasonably request.

ACKNOWLEDGEMENT OF OBLIGORS

5.       Each Obligor hereby (a) agrees that each reference to the Credit
Agreement and words of similar import in each Financing Document to which such
Obligor is party shall be a reference to the Credit Agreement as amended by this
Amendment No. 3 and (b) confirms that its obligations under each Financing
Document to which it is party remain in full force and effect after giving
effect to the amendment of the Credit Agreement by this Amendment No. 3.

MISCELLANEOUS

6.       Except as herein provided, the Credit Agreement shall remain unchanged
and in full force and effect. This Amendment No. 3 may be executed in any number
of counterparts, all of which taken together shall constitute one and the same
amendatory instrument and any of the parties hereto may execute this Amendment
No. 3 by signing any such counterpart. This Amendment No. 3 shall be governed
by, and construed in accordance with, the law of the State of New York.

                                                                          Page 3

<PAGE>

IN WITNESS WHEREOF, the parties hereto have caused this Amendment No. 3 to be
duly executed and delivered as of the day and year first above written.

HOLLY CORPORATION

By:    [Stephen J. McDonnell]
Title: Vice President Finance and Corporate Development

NAVAJO REFINING COMPANY
BLACK EAGLE, INC.
NAVAJO CORP.
NAVAJO SOUTHERN, INC.
NAVAJO NORTHERN, INC.
LOREFCO, INC.
NAVAJO CRUDE OIL PURCHASING, INC.
NAVAJO HOLDINGS, INC.
HOLLY PETROLEUM, INC.
NAVAJO PIPELINE CO.
LEA REFINING COMPANY
NAVAJO WESTERN ASPHALT COMPANY

By:    [Stephen J. McDonnell]
Title: Vice President Finance and Corporate Development

MONTANA REFINING COMPANY, A PARTNERSHIP

By Navajo Northern, Inc., its General Partner

 By:    [Stephen J. McDonnell]
 Title: Vice President Finance and Corporate Development

                                                                          Page 4
<PAGE>

CANADIAN IMPERIAL BANK OF COMMERCE, as Administrative Agent

By:    [Nora Catiis]
Title: Authorized Signatory

                                                                          Page 5

<PAGE>

CIBC INC., as Collateral Agent,

By:    [Nora Catiis]
Title: Authorized Signatory

                                                                          Page 6

<PAGE>

FLEET NATIONAL BANK, as Documentation Agent

By:    [Christopher C. Holmgren]
Title: Managing Director

                                                                          Page 7

<PAGE>

GUARANTY BUSINESS CREDIT CORPORATION, as Collateral Monitor

By:    [Harold J. Kessler]
Title: Vice President

                                                                          Page 8

<PAGE>

CIBC WORLD MARKETS CORP., as Sole Lead Arranger and Bookrunner

By:    [Nora Catiis]
Title: Authorized Signatory

                                                                          Page 9

<PAGE>

BANKS

CANADIAN IMPERIAL BANK OF COMMERCE

By:    [Nora Catiis]
Title: Authorized Signatory

                                                                         Page 10

<PAGE>

FLEET NATIONAL BANK

By:    [Christopher C. Holmgren]
Title: Managing Director

                                                                         Page 11
<PAGE>

GUARANTY BUSINESS CREDIT CORPORATION

By:    [Harold J. Kessler]
Title: Vice President

                                                                         Page 12
<PAGE>

THE BANK OF NOVA SCOTIA

By:    [F.C.H. Ashby]
Title: Senior Manager Loan Operations

                                                                         Page 13

<PAGE>

NATIONAL BANK OF CANADA

By:    [Randall Wilhoit / Doug Clark]
Title: Vice President / Vice President

                                                                         Page 14

<PAGE>

HIBERNIA NATIONAL BANK

By:    [Nancy G. Moragas]
Title: Vice President

                                                                         Page 15

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00030-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00030-of-00352.parquet"}]]