1 EXHIBIT 10.13 FORM OF SECURITY AGREEMENT THIS SECURITY AGREEMENT is dated June 9, 1997, and is made by and among UNITED REFINING COMPANY, a Pennsylvania corporation ("United Refining"), UNITED REFINING COMPANY OF PENNSYLVANIA, a Pennsylvania corporation ("United Refining PA"), KIANTONE PIPELINE CORPORATION, a New York corporation ("Kiantone" and hereinafter together with United Refining and United Refining of PA sometimes collectively referred to as the "Borrowers" and individually as a "Borrower"), the Banks (as defined in the Credit Agreement) party thereto, and PNC BANK, NATIONAL ASSOCIATION, a national banking association, as Agent for such Banks, and is referred to in Section 1.1 of the Credit Agreement dated as of June 9, 1997 among the Borrowers and the Bank (as it may hereafter be amended or otherwise modified from time to time, the "Credit Agreement"). WITNESSETH THAT: WHEREAS, in accordance with the terms of the Credit Agreement, the Banks agree to make certain Loans (as defined in the Credit Agreement) to the Borrowers; and WHEREAS, the obligation of the Banks to make Loans under the Credit Agreement is subject to the condition, among others, that the Borrowers secure their obligations to the Agent for the benefit of the Banks under the Credit Agreement by the grants of security interests in the Collateral, as defined and more fully set forth herein and each Guarantor secure its obligations to the Agent for the benefit of the Banks under the Guaranty Agreement by the grant of security interests in the Collateral, as defined and more fully set forth herein; and WHEREAS, each Borrower is the legal and beneficial owner and holder of its respective Collateral (as defined in Section 1 hereof), and has agreed to grant a security interest in such Collateral to the Bank on the terms and conditions set forth herein. NOW, THEREFORE, intending to be legally bound hereby, the parties hereto covenant and agree as follows: 1. DEFINITIONS. .1 Terms Specifically Defined Herein. When used herein, the following terms shall have the following meanings: (a) Code shall mean the Uniform Commercial Code as enacted and in effect on the date hereof in each applicable jurisdiction, and as the same may subsequently be amended from time to time. 2 (b) Collateral shall mean in the case of each Borrower, all of its right, title and interest in, to and under the following described property, whether now owned or hereafter acquired and all other property and interests in property which shall, from time to time, secure payment of the Secured Indebtedness: (i) All accounts, contract rights, general intangibles, chattel paper, instruments or documents representing any right to payment for goods sold or services rendered, whether or not earned by performance and whether or not evidenced by a contract, instrument or document, which is now owned or hereafter acquired by a Borrower (collectively, the "Accounts") (ii) All crude oil, motor gasoline and asphalt, including without limitation goods in transit, wheresoever located (including without limitation pipelines whether leased or owned) and whether now owned or hereafter acquired by a Borrower, which are or may at any time be held as raw materials, finished goods, work-in-process, and all supplies or materials used or consumed in a Borrower's business of producing crude oil, asphalt and motor gasoline or held for sale or lease, including, without limitation, (a) all such property the sale or other disposition of which has given rise to Accounts and which has been returned to or repossessed or stopped in transit by a Borrower, and (b) all packing, shipping and advertising materials relating to all or any such property, provided, however, motor gasoline after it is processed and leaves the refinery facility located in Warren, Pennsylvania shall be excluded from Inventory (collectively the "Inventory") (iii) All monies, residues and property of any kind of the Borrower in the Cash Collateral Account, as defined in the Credit Agreement, now or at any time hereafter in the possession or under the control of the Bank or a bailee of the Bank; (iv) All accessions to, substitutions for and all replacements, Products or Proceeds of the foregoing, including, without limitation, proceeds of insurance policies insuring the aforesaid Collateral, all property received wholly or partly in trade or exchange for such Collateral, and all rents, revenues, issues, profits and proceeds arising from the sale, lease, license, encumbrance, collection or any other temporary or permanent disposition of such items or any interest therein whether or not they constitute "proceeds" as defined in the Code; and (v) All books, records, documents and ledger -2- 3 receipts of the Borrower pertaining to any of the foregoing, including, without limitation, customer lists, credit files, computer records, computer programs, storage media and computer software used or required in connection with generating, processing and storing such books and records or otherwise used or acquired in connection with documenting information pertaining to the aforesaid Collateral. (c) Secured Indebtedness shall mean, as to each Borrower, all of the following: (i) all obligations, including, without limitation, all Indebtedness, whether of principal, interest, fees, expenses or otherwise, of any Borrower to the Banks, whether now existing or hereafter incurred under the Credit Agreement or any of the Loan Documents other than the Guaranty, as any of the same may from time to time be amended, modified or supplemented, together with any and all extensions, renewals, refinancings or refundings thereof in whole or in part by the Banks and including all advances, if any, made by the Banks to cure defaults under the Loan Documents; (ii) all obligations of every nature, including Indebtedness of each and every other Borrower, owed by it under the Guaranty (the "Guaranty Related Obligations") and, (iii) all out-of-pocket costs, expenses and disbursements, including, without limitation, reasonable attorneys' fees and legal expenses, incurred by the Banks or any one of them, or the Agent, in the collection of any of the obligations referred to in clause (i) or (ii) above; and (iv) any advances made by the Banks or any one of them, or the Agent, for the reasonable maintenance, preservation, protection or enforcement of, or realization upon, the Collateral, including, without limitation, advances for taxes, insurance, repairs and the like and reasonable expenses incurred to sell or otherwise realize on, or prepare for sale or other realization on, any of the Collateral. .2 Other Terms. Capitalized terms which are defined in the Credit Agreement and not otherwise defined herein shall have the meanings given to them in the Credit Agreement unless the context clearly requires otherwise. All other terms contained in this Security Agreement shall have the meanings given to them by the Code unless the context clearly requires otherwise. -3- 4 2. ASSIGNMENT AND GRANT OF SECURITY INTEREST. .1 Security Interest in Personal Property. As security for the due and punctual payment and performance of the Secured Indebtedness in full, each Borrower hereby agrees that the Agent shall have, and each Borrower hereby grants to and creates in favor of the Agent, for the benefit of each of the Agent and the Banks, (i) to secure all of the Secured Indebtedness (other than the Guaranty Related Obligations), a continuing first priority security interest in and to each Borrower's respective Collateral subject only to Permitted Liens and (ii) to secure all of the Guaranty Related Obligations, a continuing second priority security interest in and to each Borrower's respective Collateral subject only to Permitted Liens. Without limiting the generality of Section 5 below, each Borrower further agrees that with respect to each item of Collateral as to which (i) the creation of valid and enforceable security interests is not governed exclusively by the Code or (ii) the perfection of valid and enforceable security interests therein under the Code cannot be accomplished either by the Agent taking possession thereof or by the filing in appropriate locations of appropriate Code financing statements executed by the Borrower, such Borrower will at its expense execute and deliver to the Agent such documents, agreements, notices, assignments and instruments and take such further actions as may be reasonably requested by the Agent from time to time for the purpose of creating a valid and perfected first priority Lien on such item, subject only to Permitted Liens, enforceable against the Borrower and all third parties to secure the Secured Indebtedness. .2 Special Collateral. Immediately upon any Borrower's receipt of that portion of the Collateral which is or becomes evidenced by an agreement, instrument and/or document, including, without limitation, promissory notes, trade acceptances, documents of title and warehouse receipts (the "Special Collateral"), such Borrower shall deliver the original thereof to the Agent for the benefit of the Banks, together with appropriate endorsements or other specified evidence (in form and substance acceptable to the Agent) of assignment thereof to the Agent for the benefit of the Banks. Each Borrower acknowledges that it is the intent of the Borrowers, the Agent and the Banks that all Inventory now owned or hereafter acquired by the Borrowers shall be Collateral to secure the Secured Indebtedness. To the extent that Article 9 of the Code does not govern the creation and/or perfection of the Bank's Prior Security Interest intended to be created hereunder, each Borrower agrees to execute and deliver such further documents and instruments as the Agent may from time to time request in order to adequately create and fully perfect a first priority Lien with respect to such property. -4- 5 3. ACCOUNTS AND INVENTORY. .1 Verification of Accounts; Inspection; Audit. At any reasonable time or times hereafter, each Borrower shall fully and promptly cooperate with the Agent (and its officers, employees and agents) in verifying the validity, amount or any other matter relating to any Accounts. At any reasonable time or times hereafter, any of the Agent's officers, employees or agents shall have the right, in the Banks' name or in the name of the Borrowers, to verify the validity, amount or any other matter relating to any Accounts by mail, telephone or otherwise; provided, however, unless an Event of Default or Potential Default has occurred, without the prior written consent of any Borrower, none of the Agent's officers, employees or agents will directly contact any Account Debtor to verify such matters. The Agent (by any of its officers, employees or agents) shall have the right, at any time and from time to time during a Borrower's usual business hours, to audit and inspect the Collateral and all records related thereto (and to make extracts from such records), and shall have access to the premises upon which any of the Collateral is located, and the right to discuss the Collateral, at any time, with any attorney, accountant, or creditor of such Borrower and, after the occurrence of an Event of Default or Potential Default, with any Account Debtor. Subject to the limitation set forth in Section 9.5 of the Credit Agreement, all reasonable expenses and costs incurred by the Agent in connection with any audit or inspection of the Collateral shall be reimbursed by such Borrower on demand. .2 Physical Inventory. A physical inventory shall be conducted no less frequently than monthly. A Schedule of Inventory based on such physical inventory shall be provided to the Agent for the benefit of the Banks as soon as available and in any event within ten (10) Business Days after the end of each calendar month, together with such supporting information, including, without limitation, invoices relating to such Borrower's purchase of goods listed in said Schedule, as the Agent may reasonably request. .3 Notices Regarding Disputed Account. In the event any amounts due and owing in excess of $100,000 are at any time in dispute between any Account Debtor and a Borrower, such Borrower shall provide the Agent with written notice thereof at the time of submission of the next Schedule of Accounts pursuant to Section 4.2 hereof, explaining in detail the reason for the dispute, all claims related thereto and the amount in controversy. Each Borrower will in any event notify the Agent if such Borrower receives notice that an Account Debtor intends to revoke acceptance of any goods having an aggregate value in excess of $50,000, such notice to be given to the Agent within three (3) Business Days after such Borrower receives notice of such intention to revoke. .4 Returns of Inventory. Each Borrower shall notify -5- 6 the Agent of any returns of Inventory, the sale of which generated Accounts on which the Account Debtor is then (prior to such return) obligated to pay an amount in excess of $100,000 in the aggregate on any single day. .5 Collection of Accounts; Management of Collateral. (a) The Borrower's Collection. Until a Borrower's authority to do so is terminated (which the Agent may do at any time after the occurrence of an Event of Default), such Borrower will, at its own cost and expense but on the Agent's behalf and for the Agent's accounts, collect and otherwise enforce as the Agent's property and in trust for the Agent for the benefit of the Banks, in accordance with such Borrower's normal collection practices, all amounts unpaid on Accounts. (b) Bank's Collection. After termination of any Borrower's authority to collect the Accounts, as provided in subparagraph (a) above, the Agent shall have the rights set forth in this subparagraph (b). The Agent shall have the right to send notice of assignment and/or notice of the Bank's security interest to any and all Account Debtors or any third party holding or otherwise concerned with any of the Collateral, and thereafter the Agent, for the benefit of the Banks, shall have the sole right to collect the Accounts and/or take possession of the Collateral and the books and records relating thereto. The Agent, for the benefit of the Banks, shall have the right to receive, endorse, assign and/or deliver in its name or the name of such Borrower any and all checks, drafts and other instruments for the payment of money relating to the Accounts, and each Borrower hereby waives notice of presentment, protest and non-payment of any instrument so endorsed. Without limiting Section 12 hereof, each Borrower hereby constitutes the Agent or its designee as such Borrower's attorney-in-fact with power to endorse such Borrower's name upon any notes, acceptances, checks, drafts, money orders or other evidences of payment or Collateral that may come into the Agent's or a Bank's possession, to sign such Borrower's name on any invoice or bill of lading relating to any of the Accounts, drafts against Account Debtors, assignments and verifications of Accounts and notices to Account Debtors, to notify the Post Office authorities to change the address for delivery of mail addressed to such Borrower to such address as the Agent may designate, and to do all other acts and things necessary to carry out this Agreement. The Agent for the benefit of the Banks may, without notice to or consent from any Borrower, sue upon or otherwise collect, extend the time of payment of, or compromise or settle for cash, credit or otherwise upon any terms, any of the Accounts or any securities, instruments or insurance applicable thereto and release the obligor thereon. The Agent is authorized and empowered to accept the return of the goods represented by any of the Accounts, without notice to or consent by any Borrower, all without discharging or in any way affecting any Borrower's liability hereunder. Any notice sent to Account Debtors by the Agent may, at the Agent's sole discretion, -6- 7 be sent on the relevant Borrower's stationery, in which event such Borrower shall co-sign such notice with the Agent. To the extent that any Law or custom or any contract or agreement with any Account Debtor requires notice to or the approval of the Account Debtor in order to perfect such assignment of and security interest in Accounts, each Borrower agrees to promptly give such notice or obtain such approval. (c) Relationship of the Borrower and Bank. Nothing herein contained shall be construed to constitute a Borrower as agent of the Agent for any purpose whatsoever, and the Agent shall not be responsible or liable for any shortage, discrepancy, damage, loss or destruction of any part of the Collateral wherever the same may be located and regardless of the cause thereof, except to the extent the same results from the Agent's own gross negligence or willful misconduct. The Agent shall not, under any circumstances or in any event whatsoever, have any liability for any error or omission or delay of any kind occurring in the settlement, collection or payment of any of the Accounts or any instrument received in payment thereof or for any damage resulting therefrom. The Agent does not, by anything herein or in any assignment or otherwise, assume any of the Borrowers' obligations under any contract or agreement assigned to the Agent, and the Agent shall not be responsible in any way for the performance by the Borrowers of any of the terms and conditions thereof. 4. REPRESENTATIONS AND WARRANTIES. .1 General Representations and Warranties. Each Borrower represents and warrants to the Agent that such Borrower has and will continue to have good and marketable title to its respective Collateral which such Borrower purports to own or which is reflected as owned in its books and records free and clear of all Liens and other encumbrances except Permitted Liens. The locations of each Borrower's chief executive office, the Collateral and the records pertaining thereto are specified on Schedule A hereto, which is incorporated herein by reference. Except as set forth on Schedule A, none of the Collateral is located on premises not owned or leased by a Borrower or is on consignment. .2 Account Representations and Warranties. With respect to its Accounts, each Borrower represents and warrants to the Agent that: (a) the Agent may rely, in determining which Accounts listed on any Schedule of Accounts are Qualified Accounts, on all statements and representations made by such Borrower on or with respect to any such Schedule of Accounts; and (b) unless otherwise indicated in writing by such Borrower, such Borrower has determined that all of the Accounts listed in each Schedule of Accounts will qualify as Qualified -7- 8 Accounts. .3 Inventory Representations and Warranties. With respect to Inventory, each Borrower represents and warrants to the Agent that: (a) the Agent may rely, in determining which items of Inventory listed on any Schedule of Inventory are Qualified Inventory, on all statements and representations made by such Borrower on or with respect to any such Schedule of Inventory; and (b) unless otherwise indicated in writing by such Borrower, such Borrower has determined that all of the Inventory listed in each Schedule of Inventory will qualify as Qualified Inventory. 5. FURTHER ASSURANCES. Each Borrower will, from time to time, at its expense, faithfully preserve and protect the Agent's security interest in the Collateral as a continuing first and second priority perfected security interest under the Code, subject only to Permitted Liens, and will do all such other acts and things and will, upon request therefor by the Agent, execute, deliver, file and record all such other documents and instruments, including, without limitation, financing statements, security agreements, pledges, assignments, documents and powers of attorney with respect to the Collateral, and pay all filing fees and taxes related thereto as the Agent in its reasonable discretion may deem necessary or advisable from time to time in order to preserve, perfect or protect any security interest granted or purported to be granted hereby or to enable the Agent to exercise and enforce its rights and remedies hereunder with respect to any of the Collateral. Each Borrower agrees that a carbon, photographic or other reproduction of this Security Agreement or of a financing statement is sufficient as a financing statement; provided, however, each Borrower makes no representation that any filing office or officer will accept for filing any such financing statement. 6. COVENANTS. Each Borrower covenants and agrees that (a) it will maintain in good condition and repair and shall protect and preserve the Collateral and such Collateral will be insured in accordance with Section 7.1.3 of the Credit Agreement; (b) it will not sell, assign or otherwise dispose of any portion of the Collateral except sales or dispositions as permitted in Section 7.2.7 of the Credit Agreement; (c) it (i) will obtain and maintain sole and exclusive possession of the Collateral, (ii) will maintain and keep its chief executive office, the location of the Collateral and the location of the records pertaining thereto, at the location(s) specified on Schedule A hereto or at such other location as it may designate from time to time by prior written notice to the Agent, and (iii) will keep materially accurate and complete books and records concerning the Collateral and such other books and records as may be required -8- 9 under the Credit Agreement; (d) it will promptly furnish to the Agent such information and documents relating to the Collateral as the Agent may reasonably request in order to confirm the status of the Agent's security interest in such Collateral; (e) it will not take or omit to take any actions, the taking or the omission of which might result in a material adverse alteration or impairment of the Collateral or in a violation of this Security Agreement or the Credit Agreement; (f) it will not, without the prior written consent of the Agent, which will not be unreasonably withheld or delayed, waive or release any obligation of any party to any part of the Collateral, except in the ordinary course of a Borrower's business or in connection with the disposition of assets permitted under the Credit Agreement; and (g) it will execute and deliver to the Agent and record such supplements to this Security Agreement and additional assignments as the Agent reasonably may request to evidence and confirm the security interest herein contained. 7. PAYMENT OF INSURANCE PREMIUMS. In the event a Borrower, at any time hereafter, shall fail to obtain or maintain any of the policies of insurance in accordance and compliance with Section 7.1.3 of the Credit Agreement or to pay any premium in whole or in part relating thereto, then the Agent, without waiving or releasing any obligations of or any Event of Default by such Borrower under the Credit Agreement, may at any time thereafter (but shall be under no obligation to) obtain and maintain such policies of insurance and pay such premium and take any other action with respect thereto which the Agent deems advisable. All sums so disbursed by the Agent, including reasonable attorneys' fees, court costs, expenses and other charges relating thereto, shall be due and payable by such Borrower upon demand by the Agent, shall be additional Secured Indebtedness, and shall bear interest from the date due until paid by such Borrower at the Base Rate as set forth in the Credit Agreement and any increase in the Base Rate in accordance with the Credit Agreement. 8. PRESERVATION OF SECURITY INTERESTS. Each Borrower assumes full responsibility for taking and hereby agrees to take any and all necessary steps to preserve and defend the Agent's right, title and security interest in and to such Borrower's Collateral against the claims and demands of all persons. The Agent shall be deemed to have exercised reasonable care in the custody and preservation of a Borrower's Collateral in the Agent's possession if the Agent takes such action for that purpose as such Borrower shall request in writing, provided that such requested action will not, in the judgment of the Agent, impair the security interest in such Borrower's Collateral created hereby or the Agent's rights in, or the value of, such Collateral, and provided further that such written request is received by the Agent in sufficient time to permit the Agent to take the requested action. 9. AGENT'S RIGHTS WITH RESPECT TO THE COLLATERAL. At any -9- 10 time and from time to time, whether or not an Event of Default shall have occurred, and without notice to or consent of the Borrowers, the Agent may, at its option, do any or all of the following: (a) do anything which a Borrower is required but fails to do hereunder, and in particular, without limiting the generality of the foregoing, the Agent may, if a Borrower fails to do so, provided that the Agent shall take such action within the applicable time period or cure period provided for in the Credit Agreement, (this proviso to apply only to the extent so covered in the Credit Agreement) (i) insure or take any reasonable steps to protect the Collateral, (ii) pay any or all taxes, levies, expenses and costs arising with respect to the Collateral, or (iii) pay any or all premiums payable on any policy of insurance required to be obtained or maintained hereunder in accordance with Section 7 hereof; (b) inspect the Collateral of any Borrower at any reasonable time; and (c) pay any amounts the Agent reasonably elects to pay or advance hereunder on account of taxes or other costs, fees or charges arising in connection with the Collateral of any Borrower either directly to the payee(s) of such cost, fee or charge, directly to such Borrower, or to such payee(s) and such Borrower jointly. All sums so disbursed by the Agent under this Section or any other Section of this Security Agreement, including reasonable attorneys' fees, court costs, expenses and other charges relating thereto, shall be due and payable by the Borrowers upon demand by the Agent, shall be additional Secured Indebtedness, and shall bear interest at the Base Rate and any increase in the Base Rate in accordance the Credit Agreement. 10. REMEDIES ON DEFAULT. If there shall have occurred an Event of Default under the terms of the Credit Agreement, then the Agent shall have such rights and remedies with respect to the Collateral or any part thereof and the proceeds thereof as are provided by the Code and such other rights and remedies with respect thereto which it may have at law or in equity or under the Credit Agreement or this Security Agreement. In addition, upon the occurrence of an Event of Default, the Borrowers, at the request of the Agent, shall assemble all or any portion of the Collateral at such locations as the Agent shall designate which are reasonably convenient to the Borrowers, and the Agent may sell, assign, give an option or options to purchase or otherwise dispose of all or any part of the Collateral at any public or private sale at such place or places and at such time or times and upon such terms, whether for cash or on credit, and in such manner, as the Agent may determine, and apply the proceeds so received in accordance with Section 11 hereof. Written notice of sale mailed by certified mail, return receipt requested, to the Borrowers at least ten (10) days prior to such sale shall be deemed reasonable notice. 10. In the event of a breach by a Borrower in the performance of any of the terms of this Security Agreement, the Agent may demand specific performance of this Security Agreement and seek injunctive relief and may exercise any other remedy, -10- 11 available at law or in equity, it being recognized that the remedies of the Agent at law may not fully compensate the Agent for the damages they may suffer in the event of a breach hereof. 11. APPLICATION OF PROCEEDS. The security interest in the Collateral granted to and created in favor of the Agent by this Security Agreement shall be for the sole benefit of the Agent for the benefit of the Banks. Each of the rights, privileges and remedies provided to the Agent hereunder or otherwise by Law with respect to the Collateral shall be exercised by the Agent and any Collateral or proceeds thereof held or realized upon at any time by the Agent shall inure to the benefit of the Agent and shall be applied in accordance with the provisions of Section 8.2.5 of the Credit Agreement. Each Borrower shall be liable for any deficiency if the proceeds of any sale, assignment, giving of an option or options to purchase or other disposition of the Collateral is insufficient to pay all amounts to which the Agent is entitled. 12. ATTORNEYS-IN-FACT. Each Borrower hereby irrevocably appoints the Agent, its officers, employees and agents, or any of them, as attorneys-in-fact, with full power of substitution, for such Borrower for the purpose of carrying out the provisions of this Security Agreement and taking any action and executing, delivering, filing and recording any instruments which the Agent may deem necessary or advisable to accomplish the purposes hereof, which power of attorney being given for security is coupled with an interest and irrevocable. Such attorneys-in-fact shall not be liable for any acts of omission or commission, nor for any error of judgment or mistake of fact or Law, except to the extent the same results from the gross negligence or willful misconduct of the Agent, its officers, employees or agents. Each Borrower hereby ratifies and confirms and agrees to ratify and confirm all action taken by the Agent, its officers, employees or agents pursuant to the foregoing power of attorney. 13. INDEMNITY AND EXPENSES (a) In accordance with the Credit Agreement, the Borrowers unconditionally and jointly and severally agree to indemnify the Agent from and against any and all claims, losses and liabilities arising out of or resulting from this Security Agreement (including enforcement of this Security Agreement), except claims, losses or liabilities resulting from the gross negligence or willful misconduct of the Agent on behalf of the Banks. (b) The Borrowers unconditionally and jointly and severally agree upon demand to pay to the Agent the amount of any and all reasonable and necessary out-of-pocket costs, expenses and disbursements for which reimbursement is customarily obtained, including fees and expenses of its counsel, which the Agent may incur in connection with (i) the administration of this Security Agreement, (ii) the custody, preservation, use or -11- 12 operation of, or the sale of, collection from, or other realization upon, any of the Collateral, (iii) the exercise or enforcement of any of the rights of the Agent hereunder or (iv) the failure by the Borrowers to perform or observe any of the provisions hereof. 14. TERMINATION. Upon payment in full of the Secured Indebtedness and termination of the Credit Agreement and the Revolving Credit Commitment, this Security Agreement shall terminate and be of no further force and effect, and the Agent shall thereupon promptly return to each Borrower such of its Collateral and such other documents delivered by such Borrower hereunder as may then be in the Agent's possession. Upon any such termination, the Agent will, at the Borrower's expense, execute and deliver to each Borrower such documents as such Borrower shall reasonably request to evidence such termination. The Agent, upon request of a Borrower, shall return and release the Agent's security interest in any of its Collateral which is sold prior to the occurrence of an Event of Default (but not the proceeds thereof), provided such sale is permitted by, and made in accordance with, the provisions of the Credit Agreement. 15. MODIFICATIONS, AMENDMENTS AND WAIVERS. Any and all agreements amending or changing any provision of this Security Agreement or the rights of the Agent hereunder, and any and all waivers or consents to Events of Default or other departures from the due performance of the Borrowers hereunder, shall be made only pursuant to the provisions of Section 10.1 of the Credit Agreement. 16. NO IMPLIED WAIVERS; CUMULATIVE REMEDIES; WRITING REQUIRED. No course of dealing and no failure or delay on the part of the Agent in exercising any right, remedy, power or privilege hereunder shall affect any other or future exercise thereof or operate as a waiver thereof; nor shall any single or partial exercise thereof or any abandonment or discontinuance of steps to enforce such a right, power, remedy or privilege preclude any further exercise thereof or of any other right, power, remedy or privilege. The rights and remedies of the Agent under this Security Agreement are cumulative and not exclusive of any rights or remedies which they would otherwise have. Any waiver, permit, consent or approval of any kind or character on the part of the Agent of any breach or default under this Security Agreement or any such waiver of any provision or condition of this Security Agreement must be in writing and shall be effective only to the extent specifically set forth in such writing. 17. NOTICES. All notices, statements, requests, demands and other communications given to or made upon the Borrowers or the Agent in accordance with the provisions of this Security Agreement shall be given or made as provided in Section 10.6 of the Credit Agreement. -12- 13 18. SEVERABILITY. The provisions of this Security Agreement are intended to be severable. If any provision of this Security Agreement shall be held invalid or unenforceable in whole or in part in any jurisdiction, such provision shall, as to such jurisdiction, be ineffective to the extent of such invalidity or unenforceability without in any manner affecting the validity or enforceability thereof in any other jurisdiction or the remaining provisions hereof in any jurisdiction. 19. GOVERNING LAW. This Security Agreement shall be deemed to be a contract under the Laws of the Commonwealth of Pennsylvania and for all purposes shall be governed by and construed in accordance with the internal Laws of said Commonwealth without reference to its conflicts of law principles, except as required by mandatory provisions of Law and except to the extent that the validity or perfection of security interests hereunder, or remedies hereunder with respect to any particular Collateral, is governed by the laws of a jurisdiction other than the Commonwealth of Pennsylvania. 20. DURATION; SURVIVAL. All representations, warranties and covenants of the Borrowers contained herein or made in connection herewith shall survive the making of the Loans and shall not be waived by the execution and delivery of this Security Agreement, any investigation by the Agent, the making of any of the Loans, or the payment in full of the Loans and termination of the Revolving Credit Commitment. 21. PRIOR UNDERSTANDING. This Security Agreement supersedes all prior understandings and agreements, whether written or oral, between the parties hereto and thereto relating to the transactions provided for herein and therein. 22. SUCCESSORS AND ASSIGNS. This Security Agreement shall be freely assignable and transferable by the Agent in connection with the assignment or transfer of the Secured Indebtedness which assignment is addressed in and governed by the Credit Agreement; however, the duties and obligations of the Borrowers may not be delegated or transferred by the Borrowers without the prior written consent of the Agent. The rights and privileges of the Agent shall inure to the benefit of its successors and assigns, and the duties and obligations of the Borrowers shall bind the Borrowers and their respective successors and assigns. Except to the extent otherwise required by the context of this Security Agreement, the word "Banks" where used in this Security Agreement shall mean and include any holder of a Note, or assignee of an interest therein, originally issued to a Bank under the Credit Agreement, and each such holder of a Note, or assignee of an interest therein, shall be bound by and have the benefits of this Security Agreement to the same extent as if such holder had been a signatory hereto. 23. COUNTERPARTS. This Security Agreement may be executed in any number of counterparts and by the different parties hereto -13- 14 on separate counterparts, each of which, when so executed and delivered, shall be deemed an original, but all such counterparts shall constitute but one and the same instrument. [SIGNATURES BEGIN ON NEXT PAGE] -14- 15 [SIGNATURE PAGE 1 OF 1 TO SECURITY AGREEMENT] WITNESS the due execution hereof as of the day and year first above written. BANK, NATIONAL ASSOCIATION By:________________________________ Title:_____________________________ WITNESS: UNITED REFINING COMPANY _____________________________ By:________________________________ Title:_____________________________ [Seal] WITNESS: UNITED REFINING COMPANY OF PENNSYLVANIA _____________________________ By:________________________________ Title:_____________________________ [Seal] ATTEST: KIANTONE PIPELINE CORPORATION _____________________________ By:________________________________ Title:_____________________________ [Seal] 16 SCHEDULE A TO SECURITY AGREEMENT 1. The location of the Borrower's chief executive office is: 2. The locations where any of the Collateral are as follows: Address of Collateral Location Description of Collateral 3. All Collateral is at all times located at the addresses set forth above [list any exceptions].