<PAGE>

                                                                    EXHIBIT 10.1

                                                                  Execution Form

                       SECOND AMENDMENT TO SECOND AMENDED
                          AND RESTATED CREDIT AGREEMENT

      This Second Amendment to Second Amended and Restated Credit Agreement
("Second Amendment") dated as of November 1, 2004, and effective as of the
Amendment Effective Date (as defined in Section 4 below), is by and among ULTRA
RESOURCES, INC., a Wyoming corporation ("Borrower"), the several banks and
financial institutions from time to time parties to this Credit Agreement (the
"Banks," such term to include all undersigned Banks and all other financial
institutions that subsequently become parties to the Credit Agreement (referred
to below)), BANK ONE, NA, a national banking association having its principal
office in Chicago, Illinois ("Bank One") as a Bank, as the LC Issuer and as
Administrative Agent for the Banks (in such latter capacity and together with
its successors and permitted assigns in such capacity, the "Administrative
Agent").

                                   WITNESSETH:

      WHEREAS, the Borrower, the Administrative Agent and the Banks have
heretofore entered into a certain Second Amended and Restated Credit Agreement
dated as of June 9, 2004, as amended by that certain First Amendment to Second
Amended and Restated Credit Agreement dated as of August 10, 2004 (as so amended
and as otherwise amended, modified or supplemented from time to time prior to
the date hereof, the "Credit Agreement"); and

      WHEREAS, the Borrower, the Administrative Agent and the Banks have
determined that, in connection with the regularly scheduled October
redetermination of the Borrowing Base, the Borrowing Base should be increased to
$400,000,000; and

      WHEREAS, the Borrower has requested that the Credit Agreement be amended
to permit the Borrower to pay dividends in respect of its capital stock or to
redeem or repurchase shares of its capital stock, in either case, in an
aggregate amount not to exceed $100,000,000 from and after June 9, 2004, subject
to the terms and conditions set forth in the Credit Agreement as amended hereby;
and

      WHEREAS, subject to the terms and conditions of this Amendment, the Banks
party hereto, the Agent and the LC Issuer have agreed to enter into this Second
Amendment in order to effectuate such amendments and modifications;

      NOW, THEREFORE, in consideration of the premises herein contained and for
other good and valuable consideration received by each party hereto, and each
intending to be legally bound hereby, the parties agree as follows:

      Section 1. Defined Terms. Except as amended hereby, terms used herein that
are defined in the Credit Agreement shall have the same meanings herein.

<PAGE>

      Section 2. Amendments to Credit Agreement.

            (a) Clause (b) of Section 6.05 of the Credit Agreement is hereby
      amended and restated in its entirety to provide:

            "(b) the Borrower shall be permitted to declare and pay dividends or
            distributions from time to time on its capital stock in an amount
            that, together with any amounts paid by the Borrower as permitted by
            the proviso in Section 6.12, shall not exceed $100,000,000 in the
            aggregate from and after June 9, 2004, so long as the Aggregate
            Outstanding Credit Exposure both on the date of any declaration and
            on the date of any payment (and both before and after giving effect
            to any such payment) does not exceed fifty percent (50%) of the
            Borrowing Base then in effect."

            (b) The proviso in Section 6.12 of the Credit Agreement is hereby
      amended and restated in its entirety to provide:

            "provided that, notwithstanding the foregoing, the Borrower shall be
            permitted to redeem, purchase, retire or otherwise acquire for value
            any of its capital stock from time to time in an amount that,
            together with any amounts paid by Borrower as permitted by clause
            (b) of Section 6.05, shall not exceed $100,000,000 in the aggregate
            from and after June 9, 2004, so long as on the date of any payment
            in respect of any such redemption, purchase, retirement or
            acquisition for value, as applicable, (i) the Aggregate Outstanding
            Credit Exposure does not exceed fifty percent (50%) of the Borrowing
            Base then in effect (both before and after giving effect to any such
            payment), and (ii) no Event of Default shall have occurred and shall
            then be continuing."

            (c) The Compliance Certificate attached to the Credit Agreement as
      Exhibit C thereto is hereby amended by inserting the following new
      paragraph (f) immediately following the existing paragraph (e):

            "(f) the aggregate amount of all dividends or distributions paid by
            the Borrower on its capital stock under Section 6.05 of the Credit
            Agreement, plus the aggregate amount of all payments by the Borrower
            in respect of any redemption, purchase, retirement or acquisition
            for value of its capital stock under the proviso in Section 6.12, in
            each case, since the date of the most recently delivered Compliance
            Certificate is $______________; and the aggregate amount of all such
            payments made by the Borrower since June 9, 2004, is
            $_______________. (Not to exceed $100,000,000 in the aggregate from
            and after June 9, 2004.)"

                                       2

<PAGE>

      Section 3. Increase of Borrowing Base.

            (a) The Borrowing Base shall be increased to $400,000,000 from and
      after the Amendment Effective Date until the Borrowing Base shall be
      otherwise redetermined in accordance with the Credit Agreement.

            (b) Both the Borrower, on the one hand, and the Administrative Agent
      and the Banks, on the other hand, agree that the redetermination of the
      Borrowing Base pursuant to clause (a) of this Section 3 constitutes the
      regularly scheduled Borrowing Base Redetermination for October, 2004 (and
      shall not constitute a special redetermination of the Borrowing Base
      pursuant to the third paragraph of Section 2.06 of the Credit Agreement).

      Section 4. Conditions Precedent in Connection with the Second Amendment.
The Second Amendment shall become effective upon the satisfaction of each of the
following conditions precedent (the first date upon which each such condition
has been satisfied, herein the "Amendment Effective Date"):

            (a) Administrative Agent shall have received fully executed
      counterparts, in the number of multiple originals requested by
      Administrative Agent, of the Second Amendment, duly executed by an
      authorized officer for Borrower and all of the Banks;

            (b) The representations and warranties contained in Article IV of
      the Credit Agreement shall be true and correct in all material respects on
      the date of the Second Amendment (after giving effect to the provisions of
      this Second Amendment) with the same effect as though such representations
      and warranties had been made on such date; and no Event of Default shall
      have occurred and be continuing or will have occurred upon the execution
      of the Second Amendment (after giving effect to the provisions of this
      Second Amendment); and

            (c) All legal matters incident to the consummation of the
      transactions contemplated by the Second Amendment shall be satisfactory to
      the Administrative Agent and its counsel.

      Section 5. Reaffirmation of Representations and Warranties. To induce the
Banks to enter into this Second Amendment, the Borrower hereby reaffirms, as of
the date hereof, its representations and warranties contained in Article IV of
the Credit Agreement (after giving effect to the provisions of this Second
Amendment) and in all other documents executed pursuant thereto, and
additionally represents and warrants that, after giving effect to the provisions
of this Second Amendment:

            (a) The execution and delivery of this Second Amendment and the
      performance by the Borrower of its obligations under this Second Amendment
      are within the Borrower's power, have been duly authorized by all
      necessary corporate action, have received all necessary governmental
      approval (if any shall be required), and do not and will not contravene or
      conflict with any provision of law or of the charter or by-laws of the
      Borrower or of any agreement binding upon the Borrower;

                                       3

<PAGE>

            (b) The Credit Agreement as amended by this Second Amendment
      represents the legal, valid and binding obligations of the Borrower,
      enforceable against the Borrower in accordance with their respective terms
      subject as to enforcement only to bankruptcy, insolvency, reorganization,
      moratorium or other similar laws affecting the enforcement of creditors'
      rights generally;

            (c) No Event of Default or Unmatured Event of Default has occurred
      and is continuing as of the date hereof.

      Section 6. Reaffirmation of Credit Agreement. This Second Amendment shall
be deemed to be an amendment to the Credit Agreement, and the Credit Agreement,
as amended hereby, is hereby ratified, approved and confirmed in each and every
respect. All references to the Credit Agreement herein and in any other
document, instrument, agreement or writing shall hereafter be deemed to refer to
the Credit Agreement as amended hereby. The Borrower certifies that it is not
relying on any representation, warranty, covenant or agreement except for those
set forth in the Credit Agreement, as hereby amended, and in the other documents
previously executed or executed of even date herewith.

      Section 7. Governing Law. THIS SECOND AMENDMENT SHALL BE GOVERNED BY AND
CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF TEXAS AND THE APPLICABLE
LAWS OF THE UNITED STATES OF AMERICA.

      Section 8. Severability. Whenever possible each provision of this Second
Amendment shall be interpreted in such manner as to be effective and valid under
applicable law, but if any provision of this Second Amendment shall be
prohibited by or invalid under applicable law, such provision shall be
ineffective to the extent of such prohibition or invalidity, without
invalidating the remainder of such provision or the remaining provisions of this
Second Amendment.

      Section 9. Execution in Counterparts. This Second Amendment may be
executed in any number of counterparts and by the different parties on separate
counterparts, and each such counterpart shall be deemed to be an original, but
all such counterparts shall together constitute but one and the same agreement.

      Section 10. Section Captions. Section captions used in this Second
Amendment are for convenience of reference only, and shall not affect the
construction of this Second Amendment.

      Section 11. Successors and Assigns. This Second Amendment shall be binding
upon the Borrower and the Banks and their respective successors and assigns, and
shall inure to the benefit of the Borrower and the Banks, and the respective
successors and assigns of the Banks.

      Section 12. Non-Application of Chapter 346 of Texas Finance Codes. In no
event shall Chapter 346 of the Texas Finance Code (which regulates certain
revolving loan accounts and revolving tri-party accounts) apply to the Credit
Agreement as amended hereby or any other Loan Documents or the transactions
contemplated hereby.

                                       4

<PAGE>

      Section 13. ENTIRE AGREEMENT. THIS SECOND AMENDMENT TOGETHER WITH THE
CREDIT AGREEMENT, AND THE OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT
BETWEEN THE PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR,
CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS OF THE PARTIES. THERE ARE NO
WRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                            [SIGNATURE PAGES FOLLOW]

                                       5

<PAGE>

IN WITNESS WHEREOF, the parties hereto have caused this Second Amendment to be
duly executed as of the day and year first above written.

                                    BORROWER:

                                    ULTRA RESOURCES, INC.

                                    By: /s/ Michael D. Watford
                                        ----------------------------------------
                                    Name: Michael D. Watford
                                    Title: President and Chief Executive Officer

                                    ADMINISTRATIVE AGENT, LC ISSUER AND BANK:

                                    BANK ONE, NA

                                    By: /s/ Elizabeth Pavlas
                                        ----------------------------------------
                                    Name: Elizabeth Pavlas
                                    Title: Associate

                                    SYNDICATION AGENT AND BANK:

                                    UNION BANK OF CALIFORNIA, N.A.

                                    By: /s/ ALI AHMED
                                        ----------------------------------------
                                    Name: ALI AHMED
                                    Title: VICE PRESIDENT

                                    By: [ILLIGIBLE]
                                        ----------------------------------------
                                    Name: [ILLIGIBLE]
                                    Title: [ILLIGIBLE]

                                    CO-AGENT AND BANK:

                                    HIBERNIA NATIONAL BANK

                                    By: /s/ Nancy G. Moragas
                                        ----------------------------------------
                                    Name: Nancy G. Moragas
                                    Title: Vice President

                                      S - 1

<PAGE>

                                    CO-AGENT AND BANK:

                                    GUARANTY BANK, FSB

                                    By: /s/ RICHARD MENCHACA
                                        ----------------------------------------
                                    Name: RICHARD MENCHACA
                                    Title: SENIOR VICE PRESIDENT

                                    BANK:

                                    COMPASS BANK

                                    By: /s/ Kathleen J. Bowen
                                        ----------------------------------------
                                    Name: Kathleen J. Bowen
                                    Title: Senior Vice President

                                    BANK:

                                    BANK OF SCOTLAND

                                    By: /s/ Karen Weich
                                        ----------------------------------------
                                    Name: Karen Weich
                                    Title: Assistant Vice President

                                    BANK:

                                    FLEET NATIONAL BANK

                                    By: /s/ Michael J. Brochetti
                                        ----------------------------------------
                                    Name: Michael J. Brochetti
                                    Title: Director

                                      S - 2

<PAGE>

                          ACKNOWLEDGMENT BY GUARANTORS

      Each of the undersigned Guarantors hereby (i) consents to the terms and
conditions of that certain Second Amendment to Second Amended and Restated
Credit Agreement dated as of November 1, 2004 (the "Second Amendment"), (ii)
acknowledges and agrees that its consent is not required for the effectiveness
of the Second Amendment, (iii) ratifies and acknowledges its respective
Guaranteed Indebtedness under each Loan Document to which it is a party, and
(iv) represents and warrants that (a) no Default or Event of Default has
occurred and is continuing, (b) it is in full compliance with all covenants and
agreements pertaining to it in the Loan Documents, and (c) it has reviewed a
copy of the Second Amendment.

      Executed to be effective as of November 1, 2004.

                                    GUARANTORS:

                                    UP ENERGY CORPORATION
                                    ULTRA PETROLEUM CORP.

                                    By: /s/ Michael D. Watford
                                        ----------------------------------------
                                    Name: Michael D. Watford
                                    Title: President and Chief Executive Officer

                                     S - 3