<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