EXHIBIT 10.5 REGISTRATION RIGHTS AGREEMENT This Registration Rights Agreement dated as of January 29, 2003 (the "Agreement") is by and among St. Mary Land & Exploration Company, a Delaware corporation ("St. Mary"), and Flying J Oil & Gas Inc., a Utah corporation ("FJOG"), and Big West Oil & Gas Inc., a Utah corporation ("BWOG"). RECITALS WHEREAS, St. Mary, FJOG and BWOG have entered into that certain Purchase and Sale Agreement dated as of December 13, 2002 (the "PSA") by and among FJOG and BWOG, NPC Inc., a Colorado corporation, and St. Mary, whereby upon the closing of the PSA St. Mary shall issue to FJOG and BWOG a total of 3,380,818 shares (the "Shares") of St. Mary common stock, $0.01 par value per share (the "St. Mary Stock"); and WHEREAS, as a condition to the closing of the PSA and in connection with the issuance of such Shares of St. Mary Stock, St. Mary, FJOG and BWOG have agreed that St. Mary shall grant to FJOG and BWOG certain registration rights with respect to the Shares of St. Mary Stock issued under the PSA, under the terms and conditions as set forth in this Agreement. NOW, THEREFORE, in consideration of the premises and the mutual covenants and agreements contained herein and in the PSA, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto hereby agree as follows: AGREEMENT Section 1. Certain Definitions. For purposes of this Agreement, the -------------------- following terms shall have the following respective meanings: (a) "Business Day" shall mean a day other than a Saturday or ------------- Sunday or any federal holiday in the United States. (b) "Effectiveness Period" shall have the meaning set forth in -------------------- Section 2(b) hereof. (c) "Exchange Act" shall mean the Securities Exchange Act of ------------ 1934, as amended. (d) "Form S-3" shall mean such form under the Securities Act -------- as in effect on the date hereof or any registration form under the Securities Act subsequently adopted by the SEC that permits inclusion or incorporation of substantial information by reference to other documents filed by St. Mary with the SEC. (e) "Holder" shall mean FJOG or BWOG as a holder of ------ Registrable Securities, or any transferee or assignee of FJOG or BWOG pursuant to the provisions of Section 7 hereof. (f) "Prospectus" shall mean the prospectus included in the ---------- Shelf Registration Statement, as amended or supplemented by any prospectus supplement and by all other amendments thereto, including post-effective amendments, and all material incorporated by reference into such Prospectus. (g) "Registrable Securities" means the Shares of St. Mary ----------------------- Stock issued to FJOG and BWOG under the PSA, together with all shares of St. Mary Stock issued or issuable by St. Mary with respect to such Shares, until in the case of such Shares the earliest of (i) the effective registration under the Securities Act and resale in accordance with the registration statement covering such Shares, (ii) at such time that such Shares can be sold by the particular Holder (and any affiliate of the Holder with whom such Holder must aggregate its sales under Rule 144) in compliance with Rule 144 under the Securities Act in any three month period without volume limitations and without registration (and in the event that following the occurrence of the event set forth in this clause (ii) the Shares for a reason not within the reasonable control of the Holder fail to be salable as described in this clause (ii), this clause (ii) shall cease to be of any force or effect), or (iii) the sale of such Shares to the public under Rule 144. (h) "Rule 144" shall mean Rule 144 promulgated by the SEC --------- under the Securities Act. (i) "Sale Notice" shall have the meaning set forth in Section ------------ 3(e) hereof. (j) "Securities Act" shall mean the Securities Act of 1933, as -------------- amended. (k) "SEC" shall mean the United States Securities and Exchange --- Commission. (l) "Shelf Registration Statement" shall have the meaning set ----------------------------- forth in Section 2(a) hereof. (m) "Suspension Period" shall have the meaning set forth in ------------------ Section 3(b)(i) hereof. 2 (n) "Underwritten Registration" or "Underwritten Offering" -------------------------- shall mean a registration or offering in which securities of St. Mary are sold to an underwriter for reoffering to the public. (o) "Violation" shall have the meaning set forth in Section --------- 5(a) hereof. All other capitalized terms used but not defined herein shall have the respective meanings given to them in the PSA. Section 2. Form S-3 Shelf Registration. --------------------------- (a) St. Mary shall prepare and file with the SEC a registration statement on Form S-3 (or, if Form S-3 is not then available, on such form of registration statement that is then available to effect a registration of all Registrable Securities held by the Holders, subject to the consent of the Holders) pursuant to Rule 415 under the Securities Act for the purpose of registering under the Securities Act all of the Registrable Securities held by the Holders for resale by, and for the account of, the Holders as selling stockholders thereunder in order that such registration statement shall be declared effective by the SEC upon the expiration of two years following the Closing (the "Shelf Registration Statement"). St. Mary ------------------------------ shall be obligated to file only one Shelf Registration Statement pursuant to this Agreement, and shall include all Holders therein. (b) Subject to Section 3(b)(i) hereof, St. Mary shall use its best efforts to keep the Shelf Registration Statement continuously effective, supplemented and amended as required pursuant to the provisions of Section 3(b) hereof to the extent necessary to ensure that (i) it is available for resales by the Holders and (ii) conforms with the requirements of this Agreement and the Securities Act and the rules and regulations of the SEC promulgated thereunder as announced from time to time for a period (the "Effectiveness Period") of: -------------------- (i) fifteen months after the effective date of the Shelf Registration Statement; or (ii) such shorter period, from the effective date of the Shelf Registration Statement until either of (1) the sale pursuant to the Shelf Registration Statement of all the Registrable Securities or (2) at such time that the remaining Registrable Securities that are unsold by the Holders can be sold by the Holders (and any affiliates of the Holders with whom such Holders must aggregate their sales under Rule 144) in compliance with Rule 144 in any three-month period without volume limitations and without registration (and in the event that following the occurrence of the event set forth in this clause (ii) the Shares for a reason not within the reasonable 3 control of the Holder fail to be salable as described in this clause (ii), this clause (ii) shall cease to be of any force or effect). (c) Each Holder shall furnish to St. Mary such information as St. Mary may reasonably request in writing in connection with the Shelf Registration Statement, including information regarding such Holder, the Registrable Securities held by such Holder, and the intended method of disposition of such securities. Each Holder agrees to furnish promptly to St. Mary all information required to be disclosed in order to make information previously furnished to St. Mary by such Holder not materially misleading. Section 3. Registration Procedures. ----------------------- (a) In connection with the Shelf Registration Statement, St. Mary shall comply with all the provisions of Section 3(b) hereof and shall, in accordance with Section 2 hereof, prepare and file with the SEC a Shelf Registration Statement relating to the registration on an appropriate form under the Securities Act. (b) In connection with the Shelf Registration Statement and any Prospectus required by this Agreement to permit the resale of Registrable Securities, St. Mary shall: (i) Subject to any notice by St. Mary in accordance with this Section 3(b) of the existence of any fact or event of the kind described in Section 3(b)(iii)(D), use its best efforts to keep the Shelf Registration Statement continuously effective during the Effectiveness Period; upon the occurrence of any event that would cause the Shelf Registration Statement or the Prospectus contained therein (A) to contain a material misstatement or omission or (B) not be effective and usable for the resale of Registrable Securities during the Effectiveness Period, St. Mary shall file promptly an appropriate amendment to the Shelf Registration Statement or a report filed with the SEC pursuant to Section 13(a), 13(c), 14 or 15(d) of the Exchange Act, in the case of clause (A), correcting any such misstatement or omission, and, in the case of either clause (A) or (B), use its best efforts to cause such amendment to be declared effective and the Shelf Registration Statement and the related Prospectus to become usable for their intended purposes as soon as practicable thereafter. Notwithstanding the foregoing, St. Mary may suspend the effectiveness of the Shelf Registration Statement by written notice to the Holders for a period not to exceed an aggregate of thirty days in any ninety-day period (each such period, a "Suspension Period") if: ----------------- (x) an event occurs and is continuing as a result of which the Shelf Registration Statement would, in St. Mary's reasonable judgment, contain an 4 untrue statement of a material fact or omit to state a material fact required to be stated therein or necessary to make the statements therein not misleading; and (y) St. Mary reasonably determines that the disclosure of such event at such time would have a material adverse effect on the business of St. Mary and its subsidiaries, taken as a whole; provided, that (A) in the event the disclosure relates to a previously undisclosed proposed or pending material business transaction, the disclosure of which would impede St. Mary's ability to consummate such transaction, St. Mary may extend a Suspension Period from thirty days to forty-five days and (B) the Suspension Periods shall not exceed an aggregate of sixty days in any 180-day period. Each Holder agrees to hold in confidence any communication by St. Mary relating to an event described in Section 3(b)(i)(x) and (y) or Section 3(b)(iii)(D). (ii) Prepare and file with the SEC such amendments and post-effective amendments to the Shelf Registration Statement as may be necessary to keep the Shelf Registration Statement effective during the Effectiveness Period; cause the Prospectus to be supplemented by any required Prospectus supplement, and as so supplemented to be filed pursuant to Rule 424 under the Securities Act, and to comply fully with the applicable provisions of Rules 424 and 430A under the Securities Act in a timely manner; and comply with the provisions of the Securities Act with respect to the disposition of all securities covered by the Shelf Registration Statement during the applicable period in accordance with the intended method or methods of distribution by the sellers thereof set forth in the Shelf Registration Statement or supplement to the Prospectus. (iii) Advise the underwriter(s), if any, and, in the case of (A), (B), (C) and (D) below, the Holders, promptly and, if requested by such persons, to confirm such advice in writing: (A) when the Prospectus or any Prospectus supplement or post-effective amendment has been filed, and, with respect to the Shelf Registration Statement or any post-effective amendment thereto, when the same has become effective, (B) of any request by the SEC for amendments to the Shelf Registration Statement or amendments or supplements to the Prospectus or for additional information relating thereto, (C) of the issuance by the SEC of any stop order suspending the effectiveness of the Shelf Registration Statement under the Securities Act or of 5 the suspension by any state securities commission of the qualification of the Registrable Securities for offering or sale in any jurisdiction, or the initiation of any proceeding for any of the preceding purposes, or (D) of the existence of any fact or the happening of any event, during the Effectiveness Period, that makes any statement of a material fact made in the Shelf Registration Statement, the Prospectus, any amendment or supplement thereto, or any document incorporated by reference therein untrue, or that requires the making of any additions to or changes in the Shelf Registration Statement or the Prospectus in order to make the statements therein not misleading. If at any time the SEC shall issue any stop order suspending the effectiveness of the Shelf Registration Statement, or any state securities commission or other regulatory authority shall issue an order suspending the qualification or exemption from qualification of the Registrable Securities under state securities or blue sky laws, St. Mary shall use its best efforts to obtain the withdrawal or lifting of such order at the earliest practicable time. (iv) Furnish to one counsel for the Holders and each of the underwriter(s), if any, before filing with the SEC, a copy of the Shelf Registration Statement and copies of any Prospectus included therein or any amendments or supplements to either of the Shelf Registration Statement or Prospectus (other than documents incorporated by reference after the initial filing of the Shelf Registration Statement), which documents will be subject to the review of such counsel and underwriter(s), if any, for a period of five Business Days, and St. Mary shall not file the Shelf Registration Statement or Prospectus or any amendment or supplement to the Shelf Registration Statement or Prospectus (other than documents incorporated by reference) to which such counsel or the underwriter(s), if any, shall reasonably object within five Business Days after the receipt thereof. Such counsel or underwriter, if any, shall be deemed to have reasonably objected to such filing if the Shelf Registration Statement, amendment, Prospectus or supplement, as applicable, as proposed to be filed, contains a material misstatement or omission. (v) Subject to the execution of a confidentiality agreement reasonably acceptable to St. Mary, make available at reasonable times for inspection by one or more representatives of the Holders, any underwriter participating in any distribution pursuant to the Shelf Registration Statement, and any attorney or accountant retained by the Holders or any of 6 the underwriter(s), all financial and other records, pertinent corporate documents and properties of St. Mary as shall be reasonably necessary to enable them to exercise any applicable due diligence responsibilities, and cause St. Mary's officers, directors, managers and employees to supply all information reasonably requested by any such representative or representatives of the Holders, underwriter, attorney or accountant in connection with the Shelf Registration Statement after the filing thereof and before its effectiveness; provided, however, that any information designated by St. Mary as confidential at the time of delivery of such information shall be kept confidential by the recipient thereof. (vi) If requested by the Holders or the underwriter(s), if any, incorporate in the Shelf Registration Statement or Prospectus, pursuant to a supplement or post-effective amendment if necessary, such information as the Holders and underwriter(s), if any, may reasonably request to have included therein, including, without limitation: (1) information relating to the "plan of distribution" of the Registrable Securities and (2) any other terms of the offering of the Registrable Securities; and make all required filings of such Prospectus supplement or post-effective amendment as soon as reasonably practicable after St. Mary is notified of the matters to be incorporated in such Prospectus supplement or post-effective amendment. (vii) Furnish to the Holders and each of the underwriter(s), if any, without charge, at least one copy of the Shelf Registration Statement, as first filed with the SEC, and of each amendment thereto (and any documents incorporated by reference therein or exhibits thereto (or exhibits incorporated in such exhibits by reference) as such person may request in writing). (viii) Deliver to the Holders and each of the underwriter(s), if any, without charge, as many copies of the Prospectus (including each preliminary prospectus) and any amendment or supplement thereto as such persons reasonably may request; subject to any notice by St. Mary in accordance with this Section 3(b) of the existence of any fact or event of the kind described in Section 3(b)(iii)(D), St. Mary hereby consents to the use of the Prospectus and any amendment or supplement thereto by each of the Holders and each of the underwriter(s), if any, in connection with the offering and the sale of the Registrable Securities covered by the Prospectus or any amendment or supplement thereto. (ix) If an underwriting agreement is entered into and the registration is an Underwritten Registration, St. Mary shall: 7 (A) upon request, furnish to the Holders and each underwriter, if any, in such substance and scope as they may reasonably request and as are customarily made by issuers to underwriters in primary underwritten offerings, upon the date of closing of any sale of Registrable Securities in an Underwritten Registration: (1) a certificate, dated the date of such closing, signed by (y) the President and (z) the Vice President - Finance of St. Mary confirming, as of the date thereof, such matters as such parties may reasonably request; (2) opinions, each dated the date of such closing, of counsel to St. Mary covering such matters as are customarily covered in legal opinions to underwriters in connection with primary underwritten offerings of securities; and (3) customary comfort letters, dated the date of such closing, from St. Mary's independent accountants (and from any other accountants whose report is contained or incorporated by reference in the Shelf Registration Statement and from whom such a letter may be obtained), in the customary form and covering matters of the type customarily covered in comfort letters to underwriters in connection with primary underwritten offerings of securities; (B) set forth in full in the underwriting agreement, if any, indemnification provisions and procedures which provide rights no less protective than those set forth in Section 5 hereof with respect to all parties to be indemnified; and (C) deliver such other documents and certificates as may be reasonably requested by such parties to evidence compliance with clause (A) above and with any customary conditions contained in the underwriting agreement or other agreement entered into by the Holders pursuant to this clause (ix). (x) Before any public offering of Registrable Securities, cooperate with the Holders, the underwriter(s), if any, and their respective counsel in connection with the registration and qualification of the Registrable Securities under the securities or blue sky laws of such jurisdictions as the Holders or underwriter(s), if any, may reasonably request and do any and all other acts or things necessary or advisable to enable the disposition in such jurisdictions of the Registrable Securities covered by the Shelf Registration 8 Statement; provided, however, that St. Mary shall not be required (A) to register or qualify as a foreign corporation or a dealer of securities where it is not now so qualified or to take any action that would subject it to the service of process in any jurisdiction where it is not now so subject or (B) to subject itself to taxation in any such jurisdiction if it is not now so subject. (xi) Cooperate with the Holders and the underwriter(s), if any, to facilitate the timely preparation and delivery of certificates representing Registrable Securities to be sold and not bearing any restrictive legends (unless required by applicable securities laws to which the Registrable Securities are subject); and enable such Registrable Securities to be in such denominations and registered in such names as the Holders or the underwriter(s), if any, may reasonably request at least two Business Days before any sale of Registrable Securities made by such underwriter(s). (xii) Use its best efforts to cause the Registrable Securities covered by the Shelf Registration Statement to be registered with or approved by such other United States or state governmental agencies or authorities as may be necessary to enable the sellers thereof or the underwriter(s), if any, to consummate the disposition of such Registrable Securities, subject to the proviso in clause (x) above. (xiii) Subject to Section 3(b)(i) hereof, if any fact or event contemplated by Section 3(b)(iii)(D) hereof shall exist or have occurred, use its best efforts to prepare a supplement or post-effective amendment to the Shelf Registration Statement or related Prospectus or any document incorporated therein by reference or file any other required document so that, as thereafter delivered to the purchasers of Registrable Securities, the Prospectus will not contain an untrue statement of a material fact or omit to state any material fact required to be stated therein or necessary to make the statements therein not misleading. (xiv) Cooperate and assist in any filings required to be made with the NYSE and in the performance of any due diligence investigation by any underwriter that is required in accordance with the rules and regulations of the NYSE. (xv) Otherwise use its best efforts to comply with all applicable rules and regulations of the SEC and all reporting requirements under the rules and regulations of the Exchange Act. (xvi) Cause all Registrable Securities covered by the Shelf Registration Statement to be listed or quoted, as the case may be, on each securities exchange or automated 9 quotation system on which securities issued by St. Mary of the same series are then listed or quoted. (xvii) Provide promptly to each Holder upon written request each document filed with the SEC pursuant to the requirements of Section 13 and Section 15 of the Exchange Act after the effective date of the Shelf Registration Statement, unless such documents are available from EDGAR. (xviii) If requested by the underwriters in an Underwritten Offering, make appropriate officers of St. Mary reasonably available to the underwriters for meetings with prospective purchasers of the Registrable Securities and prepare and present to potential investors customary "road show" materials in a manner consistent with other similar offerings. (xix) Use its best efforts to qualify for registration on Form S-3 or its successor form. (xx) Otherwise use its best efforts to enable the Holders to dispose of the Registrable Securities on the most favorable terms in St. Mary's customary securities trading market. (c) Each Holder agrees that, upon receipt of any notice from St. Mary of the existence of any fact of the kind described in Section 3(b)(iii)(D) hereof, such Holder shall, and shall use its reasonable best efforts to cause any underwriter(s) in an Underwritten Offering to, forthwith discontinue disposition of Registrable Securities pursuant to the Shelf Registration Statement until: (i) such Holder has received copies of the supplemented or amended Prospectus contemplated by Section 3(b)(xiii) hereof; or (ii) such Holder is advised in writing by St. Mary that the use of the Prospectus may be resumed, and has received copies of any additional or supplemental filings that are incorporated by reference in the Prospectus. If so directed by St. Mary, each Holder shall deliver to St. Mary (at St. Mary's expense) all copies, other than permanent file copies then in such Holder's possession, that the Holder agrees to retain, of the Prospectus covering such Registrable Securities that was current at the time of receipt of such notice of suspension. (d) Each Holder shall furnish to St. Mary in writing such information regarding such Holder and the proposed distribution by such Holder of its Registrable Securities as St. Mary may reasonably request for use in connection with the Shelf Registration Statement or Prospectus or preliminary Prospectus included therein. Each Holder who intends to be named as a selling Holder in the Shelf Registration 10 Statement shall promptly furnish to St. Mary in writing all information required to be disclosed in order to make information previously furnished to St. Mary by such Holder not materially misleading and such other information as St. Mary may from time to time reasonably request in writing. (e) Following the effectiveness of the Shelf Registration Statement, each Holder shall notify St. Mary at least one Business Day prior to any intended distribution or resale of Registrable Securities pursuant to the Shelf Registration Statement (a "Sale Notice"), which ----------- notice shall be effective for twenty Business Days. The purpose of such Sale Notice is to enable St. Mary to make during such notice period any required post-effective amendment to the Shelf Registration Statement. St. Mary shall hold in confidence such Sale Notice and shall not utilize such information in any other manner for the benefit of itself or of any other person. Each Holder agrees to hold any communication by St. Mary in response to a Sale Notice in confidence. Section 4. Registration Expenses. All expenses incurred in connection ---------------------- with St. Mary's performance or compliance with this Agreement, including without limitation all registration, filing and qualification fees, printing fees and expenses, accounting fees and expenses, fees and disbursements of counsel for St. Mary shall be borne by St. Mary. Notwithstanding anything to the contrary herein, St. Mary shall not be required to pay for: (a) the expenses, fees and disbursements of counsel for the Holders or any underwriters, or (b) any underwriting discounts, commissions and transfer taxes incurred in connection with a resale of Registrable Securities. Section 5. Indemnification and Contribution. -------------------------------- (a) Indemnification by St. Mary. To the extent permitted by ---------------------------- law, St. Mary shall indemnify and hold harmless each Holder, the officers, directors, stockholders, employees, representatives and agents of such Holder, legal counsel and accountants for such Holder, any underwriter (as defined in the Securities Act) for such Holder and each person, if any, who controls such Holder or underwriter within the meaning of Section 15 of the Securities Act or Section 20 of the Exchange Act, against any losses, claims, damages or liabilities (joint or several) to which they may become subject under the Securities Act, the Exchange Act or any other federal or state securities law, insofar as such losses, claims, damages or liabilities (or actions in respect thereof) arise out of or are based on any of the following statements, omissions or violations (collectively a "Violation"): (i) any untrue --------- statement or alleged untrue statement of a material fact contained in the Shelf Registration Statement, including any preliminary prospectus or final prospectus contained therein or any amendments or supplements thereto, (ii) the omission or alleged omission to state therein a material fact required to be stated therein, or necessary to make the statements therein not misleading, or (iii) any violation or alleged violation by St. Mary of the Securities Act, the Exchange Act, any 11 state securities law or any rule or regulation promulgated under the Securities Act, the Exchange Act or any state securities law; and St. Mary shall reimburse such Holder, underwriter or controlling person for any legal or other expenses reasonably incurred, as incurred, in connection with investigating or defending any such loss, claim, damage, liability or action; provided that the indemnity agreement in this Section 5(a) shall not apply to amounts paid in settlement of any such loss, claim, damage, liability or action if such settlement is effected without the consent of St. Mary (which consent shall not be unreasonably withheld or delayed), nor shall St. Mary be liable in any such case for any such loss, claim, damage, liability or action to the extent that it arises out of or is based on a Violation that occurs in reliance on and in conformity with written information furnished expressly for use in connection with such registration by such Holder, underwriter or controlling person. (b) Indemnification by the Holders. To the extent permitted by ------------------------------ law, each Holder shall indemnify and hold harmless St. Mary, each of its directors and officers who sign the registration statement, the stockholders, employees, representatives and agents of St. Mary, legal counsel and accountants for St. Mary, and each person, if any, who controls St. Mary within the meaning of Section 15 of the Securities Act or Section 20 of the Exchange Act, any underwriter, any other Holder and any controlling person of any such underwriter or other Holder, against any losses, claims, damages or liabilities to which any of the foregoing persons may become subject, under the Securities Act, the Exchange Act or any other federal or state securities law, insofar as such losses, claims, damages or liabilities (or actions in respect thereof) arise out of or are based on any Violation, in each case to the extent (and only to the extent) that such Violation occurs in reliance on and in conformity with written information furnished by such Holder expressly for use in connection with such registration; and each such Holder shall reimburse any person intended to be indemnified pursuant to this Section 5(b), for any legal or other expenses reasonably incurred, as incurred, by such person in connection with investigating or defending any such loss, claim, damage, liability or action; provided that the indemnity agreement in this Section 5(b) shall not apply to amounts paid in settlement of any such loss, claim, damage, liability or action if such settlement is effected without the consent of the Holder (which consent shall not be unreasonably withheld or delayed); and provided further that in no event shall any indemnity by such Holder under this Section 5(b), when aggregated with amounts contributed, if any, pursuant to Section 5(d), exceed the net proceeds from the sale of Registrable Securities hereunder received by such Holder. (c) Indemnifying Party Can Participate in Defense. Promptly ---------------------------------------------- after receipt by an indemnified party under this Section 5 of notice of the commencement of any action (including any governmental action), 12 such indemnified party shall, if a claim in respect thereof is to be made against any indemnifying party under this Section 5, deliver to the indemnifying party notice of the commencement thereof and the indemnifying party shall have the right to participate in, and, to the extent that the indemnifying party so desires, jointly with any other indemnifying party similarly noticed, to assume the defense thereof with counsel mutually satisfactory to the parties; provided that an indemnified party (together with all other indemnified parties that may be represented without conflict by one counsel) shall have the right to retain one separate counsel, with the reasonable fees and expenses thereof to be paid by the indemnifying party, if representation of such indemnified party by the counsel retained by the indemnifying party would be inappropriate due to actual or potential differing interests between such indemnified party and any other party represented by such counsel in such proceeding. The failure to notify the indemnifying party within a reasonable time of the commencement of any such action, if prejudicial to its ability to defend such action, shall relieve such indemnifying party of any liability to the indemnified party under this Section 5, but the omission to so notify the indemnifying party will not relieve it of any liability that it may have to any indemnified party otherwise than under this Section 5. (d) Contribution Where Indemnification Not Available. If the ------------------------------------------------- indemnification provided in this Section 5 is held by a court of competent jurisdiction to be unavailable to an indemnified party with respect to any loss, liability, claim, damage or expense referred to herein, then the indemnifying party, in lieu of indemnifying such indemnified party hereunder, shall contribute to the amount paid or payable by such indemnified party as a result of such loss, liability, claim, damage or expense in such proportion as is appropriate to reflect the relative fault of the indemnifying party on the one hand and of the indemnified party on the other in connection with the statements or omissions that shall have resulted in such loss, liability, claim, damage or expense, as well as any other relevant equitable considerations; provided that in no event shall any contribution by a Holder under this Section 5(d), when aggregated with amounts paid, if any, pursuant to Section 5(b), exceed the net proceeds from the sale of Registrable Securities hereunder received by such Holder. The relative fault of the indemnifying party and of the indemnified party shall be determined by reference to, among other things, whether the untrue or alleged untrue statement of a material fact or the omission to state a material fact relates to information supplied by the indemnifying party or by the indemnified party and the parties' relative intent, knowledge, access to information, and opportunity to correct or prevent such statement or omission. (e) Underwriting Agreement Shall Control. Notwithstanding the ------------------------------------ foregoing, to the extent that the provisions on indemnification and contribution contained in the underwriting agreement entered into in connection with an Underwritten Offering are in conflict with the 13 foregoing provisions, the provisions in the underwriting agreement shall control. (f) Survival of Indemnification Obligations. The obligations ---------------------------------------- of St. Mary and the Holders under this Section 5 shall survive the completion of any offering of Registrable Securities in a registration statement under this Agreement, and otherwise. Section 6. Reports under Exchange Act. With a view to making available -------------------------- to the Holders the benefits of Rule 144 promulgated under the Securities Act and any other rule or regulation of the SEC that may at any time permit a Holder to sell securities of St. Mary to the public without registration or pursuant to a registration on Form S-3, St. Mary agrees to: (a) Make and keep available adequate current public information with respect to St. Mary, as contemplated by Rule 144, at all times; (b) Take such action as is necessary to enable the Holders to utilize Form S-3 for the resale of their Registrable Securities; (c) File with the SEC in a timely manner all reports and other documents required of St. Mary under the Securities Act and the Exchange Act; (d) Furnish to a Holder, so long as the Holder owns any Registrable Securities, promptly upon request: (i) a written statement by St. Mary that it has complied with the reporting requirements of Rule 144, the Securities Act and the Exchange Act; (ii) a copy of the most recent annual or quarterly report of St. Mary and such other reports and documents so filed by St. Mary, unless such documents are available from EDGAR; and (iii) such other information as may be reasonably requested in availing any Holder of any SEC rule or regulation that permits the selling of any such securities without registration or pursuant to Form S-3; and (e) Undertake any additional actions reasonably necessary to maintain the availability of the Shelf Registration Statement or the use of Rule 144. Section 7. Assignment of Registration Rights. The rights to cause St. ---------------------------------- Mary to register Registrable Securities under this Agreement may be assigned (but only with all related obligations) by a Holder to a transferee or assignee of such Registrable Securities that: 14 (a) is a subsidiary, parent or stockholder of a Holder; (b) is an entity controlling, controlled by or under common control, or under common investment management, with a Holder, including without limitation a corporation, partnership or limited liability company that is a direct or indirect parent or subsidiary of the Holder; or (c) is a transferee or assignee of more than fifty percent of the Registrable Securities; provided that: (i) St. Mary is, within a reasonable time after such transfer, notified of the name and address of such transferee or assignee and the Registrable Securities with respect to which such registration rights are being assigned; (ii) such transferee or assignee agrees in writing to be bound by and subject to the terms and conditions of this Agreement; and (iii) such assignment shall be effective only if immediately following such transfer the further disposition of such securities by the transferee or assignee is restricted under the Securities Act. Section 8. Subsequent Registration Rights. From and after the date of -------------------------------- this Agreement, St. Mary may enter into any agreement with any holder or prospective holder of any securities of St. Mary that would allow such holder or prospective holder to include such securities in the registration statement filed under Section 2 hereof, as long as under the terms of such agreement, such holder or prospective holder may include such securities in any such registration only to the extent that the inclusion of such securities will not reduce the amount of the Registrable Securities of the Holders that are included. Section 9. Underwritten Offering. The Holders may sell their ----------------------- Registrable Securities through an Underwritten Offering only with St. Mary's prior written consent, which consent may not be unreasonably withheld or delayed. In any such Underwritten Offering the investment bankers and managers that will administer the offering shall be selected by the Holders, provided that such investment bankers and managers must be reasonably satisfactory to St. Mary. Section 10. Termination of Registration Rights. The registration rights ---------------------------------- granted under this Agreement shall terminate as to a Holder at such time as the Holder can sell all Registrable Securities held by the Holder (and any affiliate of the Holder with whom such Holder must aggregate its sales under Rule 144) in compliance with Rule 144 under the Securities Act in any three-month period without volume limitations and without registration. Section 11. Specific Performance. St. Mary hereby acknowledges and --------------------- agrees that irreparable harm would occur in the event any of the provisions of this Agreement were not performed in accordance with their specific terms or were otherwise breached, and that damages would be an inadequate remedy for a 15 breach of this Agreement. Therefore, St. Mary agrees that the Holders shall be entitled to specific relief hereunder, including, without limitation, an order of specific performance of the terms and provisions of this Agreement, in addition to any other remedy to which they may be entitled at law or in equity. Any requirements for the securing or posting of any bond in connection with obtaining any such remedy are hereby waived. Section 12. Miscellaneous. ------------- (a) Notices. All notices, consents, requests, instructions, ------- authorizations, approvals, waivers and other communications required or permitted by this Agreement shall be in writing and shall be deemed duly given to a party when (i) delivered to the appropriate address by hand or by nationally recognized overnight courier service (costs prepaid); (ii) sent by facsimile or e-mail with confirmation of transmission by the transmitting equipment; or (iii) received or rejected by the addressee, if sent by certified mail, return receipt requested, in each case to the addresses, facsimile numbers or e-mail addresses and marked to the attention of the person (by name or title) designated in the PSA (or to such other address, facsimile number, e-mail address or person as a party may designate by notice to the other parties). (b) Entire Agreement. This Agreement sets forth the entire ----------------- understanding of the parties with respect to the subject matter hereof. (c) Binding Effect. This Agreement shall inure to the benefit -------------- of, and shall be binding upon, the parties hereto and their respective successors and permitted assigns (including permitted transferees of any shares of Registrable Securities). Nothing in this Agreement, expressed or implied, is intended to confer on any person other than the parties hereto or their respective successors and permitted assigns any rights, remedies, obligations or liabilities under or by reason of this Agreement. (d) Assignment. No party may assign its rights or delegate its ---------- obligations hereunder (whether voluntarily, involuntarily, or by operation of law) without the prior written consent of the other parties, except as otherwise provided in Section 7 hereof. Any such attempted assignment shall be null and void. (e) Further Assurances. The parties agree that at any time and ------------------ from time to time, upon the written request of a party, the parties will execute and deliver such further documents and do such further acts and things as reasonably requested to effect the purposes of this Agreement. 16 (f) Amendments. This Agreement may be amended only by an ---------- agreement in writing executed by St. Mary and the Holders of a majority in interest of the Registrable Securities. (g) Waiver. The observance of any term of this Agreement may ------ be waived only with the written consent of the party to be bound by such waiver. No failure on the part of a party to exercise any right or remedy shall operate as a waiver thereof. (h) Governing Law. This Agreement shall be governed by and -------------- construed and interpreted in accordance with the laws of the State of Colorado, without regard to any conflict of laws provisions thereof, except that the Delaware General Corporation Law shall govern as to matters of corporate law pertaining to St. Mary and the Utah Revised Business Corporation Act shall govern as to matters of corporate law pertaining to FJOG and BWOG. (i) Jurisdiction and Venue. The parties hereto agree that any ---------------------- actions, suits or proceedings arising out of or relating to this Agreement, the transactions contemplated hereby or any document referred to herein shall be brought solely and exclusively in the courts of the State of Colorado located in the City and County of Denver, Colorado and/or the courts of The United States of America located in the City and County of Denver, Colorado (and the parties agree not to commence any action, suit or proceeding relating thereto except in such courts), and further agree that service of any process, summons, notice or document by U.S. registered mail to the respective addresses referred to in Section 12(a) hereof shall be effective service of process for any such action, suit or proceeding brought against any party in any such court. The parties irrevocably and unconditionally waive any objection to the laying of venue of any action, suit or proceeding arising out of this Agreement or the transactions contemplated hereby, in the courts of the State of Colorado or The United States of America located in the City and County of Denver, Colorado, and hereby further irrevocably and unconditionally waive and agree not to plead or claim in any such court that any such action, suit or proceeding brought in any such court has been brought in an inconvenient forum. (j) Severability. If any term, provision, covenant or ------------ restriction of this Agreement is held by a court of competent jurisdiction to be invalid, void or unenforceable under applicable law, the remainder of the terms, provisions, covenants and restrictions of this Agreement shall remain in full force and effect and shall in no way be affected, impaired or invalidated, and the term, provision, covenant or restriction that is held to be invalid, void or unenforceable shall be modified so that it accomplishes to the maximum extent possible the original business purpose of such term, provision, covenant or restriction in a valid and enforceable manner. 17 (k) Attorney Fees. If any action at law or in equity is -------------- necessary to enforce or interpret the terms of this Agreement, the prevailing party shall be entitled to recover reasonable attorney fees, costs and necessary disbursements in addition to any other relief to which such party may be entitled. (l) Adjustments in Capitalization. The Registrable Securities ----------------------------- subject to this Agreement shall be subject to proportionate and appropriate adjustment in the event of any change in the number of outstanding shares of St. Mary Stock that occurs by reason of a stock dividend or split, recapitalization, reclassification, or other similar change in capitalization by St. Mary. (m) Headings. The headings, subheadings and other captions of -------- this Agreement are for convenience and reference only and shall not be used in interpreting, construing or enforcing any of the provisions of this Agreement. (n) Counterparts and Facsimile Signatures. This Agreement may ------------------------------------- be executed in any number of counterparts, and signature pages may be delivered by facsimile transmission. [Signature page follows] 18 IN WITNESS WHEREOF, this Registration Rights Agreement has been duly executed on behalf of each of the parties hereto by their duly authorized representatives as of the date first above written. ST. MARY: ST. MARY LAND & EXPLORATION COMPANY, a Delaware corporation By:/s/ MILAM RANDOLPH PHARO -------------------------------------- Milam Randolph Pharo, Vice President - Land and Legal HOLDERS: FLYING J OIL & GAS INC., a Utah corporation By:/s/ JOHN R. SCALES -------------------------------------- John R. Scales, President BIG WEST OIL & GAS INC., a Utah corporation By:/s/ JOHN R. SCALES -------------------------------------- John R. Scales, President 19