THIRD
AMENDMENT


TO


FOURTH AMENDED AND RESTATED
REVOLVING CREDIT AGREEMENT











This
Third Amendment to Fourth Amended and Restated Revolving Credit Agreement (this
“Amendment”),
dated as of February 22, 2010, is entered into by (1) FRONTIER OIL AND REFINING
COMPANY, a Delaware corporation (the “Borrower”),
(2) FRONTIER OIL CORPORATION, a Wyoming corporation (“FOC”), (3)
each of the financial institutions party to the Credit Agreement referred to
below (the “Lenders”)
and (4) UNION BANK, N.A. (formerly known as “Union Bank of California, N.A.”), a
national banking association, as administrative agent (the “Administrative
Agent”) for the Lenders.








Recitals





A.           The
Borrower, FOC, the Lenders, the Administrative Agent and BNP Paribas, a French
banking corporation, as syndication agent, are party to a Fourth Amended and
Restated Revolving Credit Agreement dated as of August 19, 2008, as amended by a
First Amendment to Fourth Amended and Restated Revolving Credit Agreement dated
as of December 15, 2008 and a Second Amendment to Fourth Amended and Restated
Revolving Credit Agreement dated as of November 18, 2009 (said Credit Agreement,
as so amended, herein called the “Credit
Agreement”). Terms defined in the Credit Agreement and not otherwise
defined herein have the same respective meanings when used herein, and the rules
of interpretation set forth in Section 1.3 of the Credit Agreement are
incorporated herein by reference.





B.           The
Borrower and the Lenders wish to amend certain covenants and definitions in the
Credit Agreement. Accordingly, for good and valuable consideration, the receipt
and sufficiency of which are hereby acknowledged, the Borrower, FOC, the Lenders
and the Administrative Agent hereby agree as set forth below.








SECTION
1.  Amendments to Credit
Agreement


.
Effective as of December 31, 2009 and subject to satisfaction of the conditions
precedent set forth in Section 2 of this Amendment, the Borrower, FOC and the
Lenders hereby agree that the Credit Agreement is amended as set forth
below.





(a)  The
definition of “Eligible Exchange Balances” in Section 1.1 of the Credit
Agreement is amended in full to read as follows:





“‘Eligible Exchange
Balances’ means all of the Borrower’s Exchange Balances with other
Persons (other than Affiliates of the Borrower) that are positive (i.e., in favor of the
Borrower) after (a) deducting from such Exchange Balances in each instance the
amount equal to the sum of the values of all obligations of the Borrower to
deliver petroleum products or to pay money that the Borrower owes or incurs
whenever it trades, lends, borrows or exchanges petroleum products in the
ordinary course of business with such Persons, the value of such obligations to
deliver petroleum products being the lesser of (i) the cost to the Borrower, as
determined on a first-in first-out basis in accordance with GAAP, of like
petroleum products for the previous month and (ii) the fair-market value of like
petroleum products, as determined in accordance with the methods prescribed in
Schedule 4, (b) adjusting such Exchange Balances upward or downward, as
applicable, to account for all discounts, allowances, rebates, credits and other
adjustments in respect of such Exchange Balances and (c) deducting from such
Exchange Balances the amount billed for or representing retainage, if any, by
such Persons with respect to such Exchange Balances, until all prerequisites to
the immediate payment of such retainage have been satisfied; provided, however, that
Eligible Exchange Balances shall not include any Exchange Balance with respect
to which (i) the Collateral Agent does not have a perfected first-priority
security interest, (ii) any representation, warranty or covenant contained in
this Agreement or any other Credit Document has been breached, (iii) the
customer or trading partner has disputed liability, or made any claim to the
Borrower with respect to such Exchange Balance or with respect to any other
Exchange Balance due from such customer or trading partner, other than for a
minimal adjustment in the ordinary course of business and in accordance with
regular commercial practice, or (iv) any event of a type described in Section
8.1(e) has occurred with respect to the customer or trading partner, or the
customer or trading partner has suspended normal business
operations.”





(b)  The
definition of “Eligible Inventory” in Section 1.1 of the Credit Agreement is
amended in full to read as follows:





“‘Eligible
Inventory’ means all of the Borrower’s Inventory that (a) is covered by a
perfected first-priority security interest in favor of the Collateral Agent
(subject only to storage, transportation and other nonconsensual Liens created
by operation of law or tariff in favor of carriers, transporters and
warehousemen, securing only amounts due to such carriers, transporters and
warehousemen in respect of carriage, transportation and storage services with
respect to such Inventory, in each case securing obligations not then in
default), (b) complies with all of the Borrower’s representations, warranties
and covenants in the Credit Documents, (c) is not obsolete, unsalable, damaged
or otherwise unfit for sale or further processing in the ordinary course of
business, (d) is currently salable in compliance with all applicable
Governmental Rules and without the need for any Governmental Action, (e) is held
at locations set forth on Schedule 1 to the Security Agreement, (f) is listed on
Schedule 4 attached to the most recent Borrowing Base Certificate delivered to
the Lenders and (g) is otherwise satisfactory to the Administrative Agent, in
its sole discretion, using reasonable business judgment, all such Inventory to
be valued, at any time of determination, at the lower of (i) fair-market value,
as determined in accordance with the methods prescribed in Schedule 4, and (ii)
the cost to the Borrower, as determined on a first-in first-out basis in
accordance with GAAP.”





(c)  The
definition of “Exchange Balances” in Section 1.1 of the Credit Agreement is
amended in full to read as follows:





“‘Exchange
Balances” means, with respect to any Person, all rights to receive
petroleum products or to receive payment of money that the Borrower generates,
acquires, possesses or owns whenever the Borrower trades, lends, borrows or
exchanges petroleum products in the ordinary course of business with such Person
(other than an Affiliate of the Borrower), the value of such rights to receive
petroleum products being the lesser of (a) the cost to the Borrower, as
determined on a first-in first-out basis in accordance with GAAP, of like
petroleum products for the previous month and (b) the fair-market value of like
petroleum products, as determined in accordance with the methods prescribed in
Schedule 4.”





(d)  The
definition of “Prepaid Crude Purchases” in Section 1.1 of the Credit Agreement
is amended in full to read as follows:





“‘Prepaid Crude
Purchases’ means all rights to receive crude oil that the Borrower
acquires, possesses or owns whenever the Borrower prepays for purchases of crude
oil in the ordinary course of business from Shell Trading (US) Company, a
Delaware corporation, BP Oil Supply Company, a Delaware corporation, Bayoil
(USA), Inc., a Delaware corporation, Koch Supply & Trading, L.P., a Delaware
limited partnership, or any other Person as to which the Majority Lenders
through the Administrative Agent otherwise give their prior written approval
(which approval may be withdrawn at any time by the Majority Lenders through the
Administrative Agent by written notification to the Borrower), the value of such
rights being the lesser of (a) the cost to the Borrower for such crude oil, as
determined on a first-in first-out basis in accordance with GAAP, and (b) the
fair-market value of such crude oil, as determined in accordance with the
methods prescribed in Schedule 4.”





(e)  The
definitions of “Pricing Level 1,” “Pricing Level 2” and “Pricing Level 3” in
Section 1.1 of the Credit Agreement are amended in full to read as
follows:





“‘Pricing Level
1’ means the Pricing Level that applies to each Advance (whether then
outstanding or thereafter made) on and after, to each Letter of Credit (whether
then outstanding or thereafter issued) on and after, and to each Commitment on
and after, the date of receipt by the Administrative Agent of a schedule of
computations referred to in Section 6.4(a) or (b) if the ratio of (a) the amount
of Consolidated Long-Term Debt minus the aggregate amount, if any, of Cash
Equivalents held by FOC and its Subsidiaries in excess of the sum of the
smallest aggregate amount of Cash Equivalents needed to be held by FOC and its
Subsidiaries in order for FOC to comply with the covenant contained in Section
7.10, all as determined on the last day of the fiscal quarter of FOC ended
immediately before that date, to (b) Consolidated EBITDA for the Calculation
Period ended on the last day of that fiscal quarter was less than 2.25:1.00, as
demonstrated by that schedule; provided, however, that in any
case (i) if the amount determined under clause (a) above as of the last day of a
fiscal quarter of FOC is negative, then Pricing Level 1 shall apply, (ii) if the
amount determined under clause (a) above as of the last day of a fiscal quarter
of FOC is positive and Consolidated EBITDA for the Calculation Period ended on
that day is negative, then Pricing Level 3 shall apply, (iii) if the information
in any schedule referred to above is incorrect and results in the payment of
lower interest or fees than should have been paid based on the correct
information, then the Borrower shall nevertheless be liable to the Lenders and
the Administrative Agent for the correct amounts of interest and fees and will
pay any unpaid portion of the same to the Administrative Agent for the benefit
of the Person(s) entitled thereto, promptly upon demand therefor, and (iv) if
FOC fails to deliver any such schedule by the required day, then Pricing Level 3
shall apply until FOC delivers such schedule and the appropriate Pricing Level
can be determined.”





“‘Pricing Level
2’ means the Pricing Level that applies to each Advance (whether then
outstanding or thereafter made) on and after, to each Letter of Credit (whether
then outstanding or thereafter issued) on and after, and to each Commitment on
and after, the date of receipt by the Administrative Agent of a schedule of
computations referred to in Section 6.4(a) or (b) if the ratio of (a) the amount
of Consolidated Long-Term Debt minus the aggregate amount, if any, of Cash
Equivalents held by FOC and its Subsidiaries in excess of the sum of the
smallest aggregate amount of Cash Equivalents needed to be held by FOC and its
Subsidiaries in order for FOC to comply with the covenant contained in Section
7.10, all as determined on the last day of the fiscal quarter of FOC ended
immediately before that date, to (b) Consolidated EBITDA for the Calculation
Period ended on the last day of that fiscal quarter was equal to or greater than
2.25:1.00 but less than 3.00:1.00, as demonstrated by that schedule; provided, however, that in any
case (i) if the amount determined under clause (a) above as of the last day of a
fiscal quarter of FOC is negative, then Pricing Level 1 shall apply, (ii) if the
amount determined under clause (a) above as of the last day of a fiscal quarter
of FOC is positive and Consolidated EBITDA for the Calculation Period ended on
that day is negative, then Pricing Level 3 shall apply, (iii) if the information
in any schedule referred to above is incorrect and results in the payment of
lower interest or fees than should have been paid based on the correct
information, then the Borrower shall nevertheless be liable to the Lenders and
the Administrative Agent for the correct amounts of interest and fees and will
pay any unpaid portion of the same to the Administrative Agent for the benefit
of the Person(s) entitled thereto, promptly upon demand therefor, and (iv) if
FOC fails to deliver any such schedule by the required day, then Pricing Level 3
shall apply until FOC delivers such schedule and the appropriate Pricing Level
can be determined.”





“‘Pricing Level
3’ means the Pricing Level that applies to each Advance (whether then
outstanding or thereafter made) on and after, to each Letter of Credit (whether
then outstanding or thereafter issued) on and after, and to each Commitment on
and after, the date of receipt by the Administrative Agent of a schedule of
computations referred to in Section 6.4(a) or (b) if the ratio of (a) the amount
of Consolidated Long-Term Debt minus the aggregate amount, if any, of Cash
Equivalents held by FOC and its Subsidiaries in excess of the sum of the
smallest aggregate amount of Cash Equivalents needed to be held by FOC and its
Subsidiaries in order for FOC to comply with the covenant contained in Section
7.10, all as determined on the last day of the fiscal quarter of FOC ended
immediately before that date, to (b) Consolidated EBITDA for the Calculation
Period ended on the last day of that fiscal quarter was equal to or greater than
3.00:1.00, as demonstrated by that schedule; provided, however, that in any
case (i) if the amount determined under clause (a) above as of the last day of a
fiscal quarter of FOC is negative, then Pricing Level 1 shall apply, (ii) if the
amount determined under clause (a) above as of the last day of a fiscal quarter
of FOC is positive and Consolidated EBITDA for the Calculation Period ended on
that day is negative, then Pricing Level 3 shall apply, (iii) if the information
in any schedule referred to above is incorrect and results in the payment of
lower interest or fees than should have been paid based on the correct
information, then the Borrower shall nevertheless be liable to the Lenders and
the Administrative Agent for the correct amounts of interest and fees and will
pay any unpaid portion of the same to the Administrative Agent for the benefit
of the Person(s) entitled thereto, promptly upon demand therefor, and (iv) if
FOC fails to deliver any such schedule by the required day, then Pricing Level 3
shall apply until FOC delivers such schedule and the appropriate Pricing Level
can be determined.”





(f)  Section
7.10 of the Credit Agreement is amended in full to read as follows:





“Section
7.10                                Leverage Ratio. FOC
will not permit the ratio of (a) the amount of Consolidated Funded Debt as of
the last day of any fiscal quarter of FOC minus the aggregate amount of Cash
Equivalents held by FOC and its Subsidiaries as of that day to (b) Consolidated
EBITDA for the Calculation Period ended on that day to be greater than 3.50 to
1.00, as measured by the financial information to be delivered pursuant to
Section 6.4(a) or (b); provided, however, that in any
case (i) if the amount determined under clause (a) above as of the last day of a
fiscal quarter of FOC is negative, then FOC shall be deemed to be in compliance
as of that day with the covenant contained in this section, and (ii) if the
amount determined under clause (a) above as of the last day of a fiscal quarter
of FOC is positive and Consolidated EBITDA for the Calculation Period ended on
that day is negative, then FOC shall be deemed not to be in compliance as of
that day with the covenant contained in this section.”





(g)  Section
7.13 of the Credit Agreement is amended in full to read as follows:





“Section
7.13                                Holding of Cash
Equivalents. FOC will not permit the aggregate amount of Cash Equivalents
held by it and its Subsidiaries as of the last day of any fiscal quarter of FOC
to be less than the sum of (a) the smallest aggregate amount of Cash Equivalents
needed to be held by FOC and its Subsidiaries as of that day in order for FOC to
be in compliance with the covenant contained in Section 7.10 and (b) the
smallest additional aggregate amount of Cash Equivalents needed to be held by
FOC and its Subsidiaries (but not in excess of the additional aggregate amount
of Cash Equivalents actually held by FOC and its Subsidiaries) as of that day in
order for the Borrower to qualify for the most favorable (to it) Pricing Level,
as measured by the financial information to be delivered pursuant to Section
6.4(a) or (b).”





SECTION
2.  Conditions
Precedent


. This
Amendment shall become effective on the date on which the Administrative Agent
has received all of the following, each dated the date hereof, in form and
substance satisfactory to the Administrative Agent and in the number of
originals requested thereby:





(a)  this
Amendment, duly executed by the Borrower, FOC and the Majority Lenders;
and





(b)  a consent
to this Amendment, duly executed by the Guarantors and by the Borrower, in its
capacity as guarantor under the Borrower Guaranty.





SECTION
3.  Representations and
Warranties


. Each of
the Borrower and FOC represents and warrants to the Lenders and the
Administrative Agent as set forth below.





(a)  The
execution, delivery and performance by each of the Borrower and FOC of this
Amendment and the Credit Agreement, as amended hereby, and the consummation of
the transactions contemplated hereby and thereby, are within such Credit Party’s
legal powers, have been duly authorized by all necessary legal action and do not
(i) contravene such Credit Party’s charter documents or bylaws, (ii) violate any
Governmental Rule, (iii) conflict with or result in the breach of, or constitute
a default under, any Material Contract, loan agreement, indenture, mortgage,
deed of trust or lease, or any other contract or instrument, binding on or
affecting such Credit Party, any of its Subsidiaries or any of their respective
properties, the conflict, breach or default of which could reasonably be
expected to have a Material Adverse Effect, or (iv) result in or require the
creation or imposition of any Lien upon or with respect to any of the properties
of such Credit Party or any of its Subsidiaries, except for Liens created or
permitted under the Credit Documents, as amended hereby. Neither such Credit
Party nor any of its Subsidiaries is in violation of any Governmental Rule or in
breach of any such contract, loan agreement, indenture, mortgage, deed of trust,
lease or other contract or instrument, the violation or breach of which could
reasonably be expected to have a Material Adverse Effect.





(b)  No
Governmental Action, and no authorization, approval or other action by, or
notice to, any third party, is required for the due execution, delivery or
performance by the Borrower or FOC of this Amendment or the Credit Agreement, as
amended hereby, or for the consummation of the transactions contemplated hereby
or thereby, except for (i) authorizations, approvals and other actions by, and
notices to, third parties, the failure to obtain which could not reasonably be
expected to have a Material Adverse Effect, and (ii) Governmental Action that
has been duly obtained, taken, given or made and is in full force and
effect.





(c)  This
Amendment and the Credit Agreement, as amended hereby, have been duly executed
and delivered by the Borrower and FOC. This Amendment and the Credit Agreement,
as amended hereby, are the legal, valid and binding obligations of the Borrower
and FOC, enforceable against each such Credit Party in accordance with their
respective terms, except as the enforceability hereof or thereof may be limited
by bankruptcy, insolvency, moratorium, reorganization or other similar laws
affecting creditors’ rights generally or by equitable principles relating to
enforceability.





(d)  Each of
the Security Agreement and the Stock Pledge Agreement constitutes a valid and
perfected first-priority Lien on the Collateral purported to be encumbered
thereby, enforceable against all third parties in all jurisdictions, and secures
the payment of all obligations of the Borrower or FRMI, as applicable, under the
Credit Documents, as amended hereby, to which the Borrower or FRMI, as
applicable, is a party, and the execution, delivery and performance of this
Amendment do not adversely affect the Lien of the Security Agreement or the
Stock Pledge Agreement.





(e)  There has
been no amendment to the charter documents or bylaws of the Borrower or FOC on
or after August 19, 2008, except for the amendment and restatement of FOC’s
bylaws as provided in the Report on Form 8-K dated November 11, 2008 filed with
the Securities and Exchange Commission. The representations and warranties
contained in each Credit Document, as amended hereby, to which the Borrower
and/or FOC is a party are correct in all material respects on and as of the date
hereof, before and after giving effect to this Amendment, as though made on and
as of the date hereof. No event has occurred and is continuing, or would result
from the effectiveness of this Amendment, that constitutes a
Default.





SECTION
4.  Reference to and Effect on
Credit Documents


.





(a)  On and
after the effective date of this Amendment, each reference in the Credit
Agreement to “this Agreement,” “hereunder,” “hereof,” “herein” or words of like
import referring to the Credit Agreement, and each reference in the other Credit
Documents to “the Credit Agreement,” “thereunder,” “thereof,” “therein” or words
of like import referring to the Credit Agreement, shall mean and be a reference
to the Credit Agreement as amended by this Amendment.





(b)  Except as
specifically amended above, the Credit Agreement and the other Credit Documents
shall remain in full force and effect and are hereby ratified and confirmed.
Without limiting the generality of the foregoing, the Security Agreement and the
Stock Pledge Agreement and all of the Collateral described therein do and shall
continue to secure the payment of all obligations under the Credit Documents, as
amended hereby, stated to be secured thereby.





(c)  The
execution, delivery and effectiveness of this Amendment shall not operate as a
waiver of any right, power or remedy of the Administrative Agent or any Lender
under any of the Credit Documents or constitute a waiver of any provision of any
of the Credit Documents.





SECTION
5.  Costs and
Expenses


. The
Borrower agrees to pay on demand all costs and expenses of the Administrative
Agent in connection with the preparation, execution and delivery of this
Amendment and the other instruments and documents to be delivered hereunder,
including the reasonable fees and out-of-pocket expenses of counsel for the
Administrative Agent with respect thereto and with respect to advising the
Administrative Agent as to its rights and responsibilities hereunder and
thereunder.





SECTION
6.  Execution in
Counterparts


. This
Amendment may be executed in any number of counterparts and by the parties
hereto in separate counterparts, each of which when so executed and delivered
shall be deemed to be an original and all of which taken together shall
constitute one and the same agreement. Delivery of an executed counterpart of a
signature page to this Amendment by telecopier or e-mail shall be effective as
delivery of an originally executed counterpart of this Amendment.





SECTION
7.  Governing
Law


. THIS AMENDMENT SHALL BE GOVERNED BY,
AND CONSTRUED AND ENFORCED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF
CALIFORNIA APPLICABLE TO CONTRACTS MADE AND PERFORMED IN THE STATE OF
CALIFORNIA.














[Signature
pages follow.]





The
parties hereto have caused this Amendment to be executed by their respective
duly authorized representatives as of the date first written above.








FRONTIER
OIL AND REFINING COMPANY








By:       /s/ Doug S.
Aron


Name:  Doug
S.
Aron


Title:    EVP
&
CFO











FRONTIER
OIL CORPORATION








By:       /s/ Doug S.
Aron


Name:  Doug
S.
Aron


Title:    EVP
&
CFO











UNION
BANK, N.A.,


as
Administrative Agent and Lender








By:       /s/ Timothy
Brendel


Name:  Timothy
Brendel


Title:    Vice
President











BNP
PARIBAS








By:        /s/ Courtney
Kubesch


Name:   Courtney
Kubesch


Title:     Vice
President








By:        /s/ Edward
Pak


Name:   Edward
Pak


Title:     Vice
President











TORONTO
DOMINION (TEXAS) LLC








By:       /s/ Ian
Murray


Name:  Ian
Murray


Title:    Authorized
Signatory











WELLS
FARGO BANK, N.A.








By:       /s/ Oleg
Kogan


Name:  Oleg
Kogan


Title:    Vice
President











U.S. BANK
NATIONAL ASSOCIATION








By:       /s/ Monte E.
Deckerd


Name:  Monte
E.
Deckerd


Title:    Senior
Vice
President











EXPORT
DEVELOPMENT CANADA








By:       /s/ Auturo
Polisena


Name:  Auturo
Polisena


Title:    Asset
Manager








By:       /s/ Talal M.
Kairouz


Name:  Talal
M.
Kairouz


Title:    Asset
Manager








SUMITOMO
MITSUI BANKING CORPORATION








By:        /s/ Masakazu
Hasegawa


Name:  Masakazu
Hasegawa


Title:    General
Manager











BANK OF
SCOTLAND PLC








By:       /s/ Julia R.
Franklin


Name:  Julia
R.
Franklin


Title:    Assistant
Vice
President











CAPITAL
ONE, N.A.








By:       /s/ Wesley
Fontana


Name:  Wesley
Fontana


Title:     Vice
President











UBS LOAN
FINANCE LLC








By:       /s/ Mary E.
Evans


Name:  Mary
E.
Evans


Title:    Associate
Director








By:       /s/ Marie
Haddad


Name:  Marie
Haddad


Title:    Associate
Director











THE FROST
NATIONAL BANK








By:      /s/ Thomas H.
Dungan


Name: Thomas
H.
Dungan


Title:   Sr.
Vice
President











NATIXIS








By:       /s/ Daniel
Payer


Name:  Daniel
Payer


Title:    Director








By:       /s/ Donovan C.
Broussard


Name:  Donovan
C.
Broussard


Title:    Managing
Director