EXHIBIT 10.4 STOCK PLEDGE AGREEMENT From: Flying J Oil & Gas Inc., a Utah corporation and Big West Oil & Gas Inc., a Utah corporation with their principal executive offices at 333 West Center Street, North Salt Lake, Utah 84054-2805 (together the "Debtor"). To: St. Mary Land & Exploration Company, a Delaware corporation as lender pursuant to that certain Nonrecourse Secured Promissory Note of even date herewith (the "Secured Party"). (A) Grant of Security Interest. -------------------------- In consideration of the loan of $71,593,795 together with interest accrued thereon prior to a date that is two years and six months after the date of the Nonrecourse Secured Promissory Note and any costs and attorneys' fees associated therewith (the "Debt") made by the Secured Party to the Debtor pursuant to the Nonrecourse Secured Promissory Note of even date herewith, and all renewals, extensions, amendments, modifications, supplements, or substitutions therefor (the "Nonrecourse Secured Promissory Note"), the Debtor hereby grants to the Secured Party a security interest in all of the right, title and interest (whether now existing or hereafter acquired and wherever located) of the Debtor in and to the following (the "Collateral") to secure payment and performance of all of the Debtor's present and future obligations with respect to the Debt: 3,380,818 shares of the Secured Party's common stock issued to the Debtor among others, all certificates evidencing any such shares, and all dividends, cash, instruments and other property now or hereafter received, receivable or otherwise distributed in respect of or in exchange for any or all of such shares, together with all proceeds of any and all of the foregoing. Except as set forth below, the Debt shall otherwise be without recourse to the Debtor, meaning that the Secured Party's sole recourse for Debtors failure to pay the Debt and for any default in the Nonrecourse Secured Promissory Note shall be to retain and/or realize upon the Collateral. Secured Party shall have no cause of action or other right against Debtor to pursue or collect from Debtor any deficiency or other amount whatsoever relating to the Nonrecourse Secured Promissory Note or any default therein. The foregoing non-recourse provision shall not however apply to interest accrued on the Debt from and after two years and six months following the date of the Nonrecourse Secured Promissory Note or to any default interest thereon or any costs of collection thereof, and this Stock Pledge Agreement shall not apply to any of such amounts. (B) Debtor's Representations, Warranties and Agreements. The Debtor -------------------------------------------------------- represents, warrants and agrees that: 1. Except with respect to the lien granted herein, the Debtor owns the same right in the Collateral that it received from the Secured Party and no other person has or claims any interest in any Collateral by, under, from or through the Debtor. The Debtor has and will have at all times full right, power and authority to grant a security interest in the Collateral to the Secured Party as provided herein, free and clear of any lien, adverse claim, or encumbrance made by, under, from or through Debtor.The Debtor will defend any proceeding which may materially affect title to or the Secured Party's security interest in any Collateral to the extent that the claim arises by, through, under or from the Debtor, and will indemnify the Secured Party for all reasonable costs and expenses of the Secured Party's defense against such claims. 2. The Debtor will pay when due all future charges, liens or encumbrances on the Collateral arising by, through, under or from the Debtor and all taxes and assessments hereafter levied or imposed on or adversely affecting the Collateral provided that the foregoing need not be paid while being diligently contested in good faith and by appropriate proceedings so long as adequate reserves have been established with respect thereto. 3. All certificates evidencing the Collateral shall be delivered to the Secured Party on or prior to the execution and delivery of this Agreement, and all such certificates shall be held by the Secured Party pursuant hereto and shall be delivered in suitable form for transfer by delivery with any necessary endorsement or shall be accompanied by fully executed instruments of transfer or assignment in blank, all in form and substance satisfactory to the Secured Party. 4. The Secured Party is irrevocably appointed as the attorney-in-fact of the Debtor (which appointment is coupled with an interest) upon the occurrence and during the continuation of a Default (as defined in paragraph 1 of section (C) and after giving effect to any relevant grace periods) to do any act which the Debtor is obligated hereby to do, to exercise such rights as the Debtor might exercise, and to execute and file in the name of the Debtor any financing statements and amendments thereto required to perfect the Secured Party's security interest hereunder, all to protect and preserve the Collateral and the Secured Party's rights hereunder. Upon the occurrence and during the continuation of a Default, the Secured Party may at its option, and as its sole recourse against Debtor, retain the Collateral in full satisfaction of the Debt or any unpaid portion thereof. 5. The Debtor waives (a) presentment, protest and notice of protest; and (b) any right to the benefit of or to direct the application of any Collateral upon the occurrence and during the continuation of a Default until the Debt shall have been paid 2 (C) Defaults and Remedies; Non-waiver. --------------------------------- 1. A Default as defined under the Nonrecourse Secured Promissory Note shall constitute a Default under this Stock Pledge Agreement. 2. Upon Default of the Debtor, at the Secured Party's option, without demand or notice, all or any part of the Debt shall immediately become due. The Secured Party shall have only those rights provided by this Stock Pledge Agreement and the Nonrecourse Secured Promissory Note. The Secured Party's acceptance of partial or delinquent payments or failure of the Secured Party to exercise any right or remedy at any time shall not waive any obligation of the Debtor, or any right or remedy of the Secured Party, or modify this Stock Pledge Agreement, or waive any other similar default. (D) Voting Rights, Dividends, Etc. in Respect of Collateral. ------------------------------------------------------- 1. So long as no Default shall have occurred and be continuing, the Debtor may receive and retain any and all dividends paid in respect of the Collateral; provided, however, that any and all (a) dividends paid or payable other than in cash in respect of, and instruments and other property received, receivable or otherwise distributed in respect of or in exchange for, any Collateral, (b) dividends and other distributions paid or payable in cash in respect of any Collateral in connection with a partial or total liquidation or dissolution or in connection with a reduction of capital, capital surplus or paid-in surplus, and (c) cash paid, payable or otherwise distributed in redemption of, or in exchange for, any Collateral shall be retained by Secured Party to hold as Collateral hereunder. 2. Upon the occurrence and during the continuance of a Default (a) all rights of the Debtor to receive and retain the dividends which it would otherwise be authorized to receive and retain pursuant to subsection (1) of this section shall automatically cease, and all such rights shall thereupon become vested in the Secured Party which shall thereupon have the sole right to receive and hold as Collateral such dividends; (b) without limiting the generality of the foregoing, the Secured Party may at its option exercise any and all rights of conversion, exchange, subscription or any other rights, privileges or options pertaining to any of the Collateral as if it were the absolute 3 owner thereof, including, without limitation, the right to exchange, in its discretion, any and all of the Collateral upon the merger, consolidation, reorganization, recapitalization or other adjustment of the Secured Party. (E) General Provisions. ------------------ 1. On transfer of all or any part of the Debt, the Secured Party may transfer all or any part of the security interest in the Collateral. Any such transfer shall discharge the Secured Party from all liability and responsibility with respect to such Collateral transferred. This Stock Pledge Agreement benefits the Secured Party's successors and assigns and binds the successors and assigns of the Debtor. This Stock Pledge Agreement contains the entire security agreement by the Debtor and the Secured Party. The Debtor will execute any additional agreements, assignments or documents which the Secured Party reasonably may request to effectuate this Stock Pledge Agreement or perfect any rights or interests of the Secured Party. 2. Captions, titles and section and paragraph divisions and arrangements in this Stock Pledge Agreement and in any instruments and documents heretofore or hereafter made or executed are for convenience and for reference only, and shall not affect the meaning, interpretation or construction thereof. Whenever the context so requires, any gender shall include all other genders, and the singular number shall include the plural. 3. If any one or more provisions of this Stock Pledge Agreement should be invalid, illegal or unenforceable in any respect, the validity, legality and enforceability of the remaining provisions contained herein shall not in any way be affected, impaired or prejudiced thereby. 4. All notices under this Stock Pledge Agreement shall be in writing and legible and shall be effective upon (a) receipt or refusal to accept delivery if delivered personally, (b) one business day after deposit with an overnight courier service, (c) three business days after deposit in the mails if mailed, or (d) upon receipt of written confirmation if delivered by facsimile transmission. 5. This Stock Pledge Agreement shall be governed by and construed in accordance with the laws of the State of Colorado and may be executed in counterparts and by facsimile transmission. Venue for any action regarding this Stock Pledge Agreement shall lie exclusively in the state or federal district court located in Denver, Colorado. 4 IN WITNESS WHEREOF, the parties have duly executed this Stock Pledge Agreement as of January 29, 2003. DEBTOR: FLYING J OIL & GAS INC., a Utah corporation By: /s/ JOHN R. SCALES ---------------------------------------- Title: President ---------------------------------------- BIG WEST OIL & GAS INC., a Utah corporation By: /s/ JOHN R. SCALES --------------------------------------- Title: President --------------------------------------- SECURED PARTY: ST. MARY LAND & EXPLORATION COMPANY, a Delaware corporation By: /s/ MILAM RANDOLPH PHARO --------------------------------------- Title: Vice President - Land & Legal --------------------------------------- 5