<PAGE>

                                                                    EXHIBIT 10.1

                         FIRST AMENDMENT TO AMENDED AND
                            RESTATED CREDIT AGREEMENT

      THIS FIRST AMENDMENT TO CREDIT AGREEMENT (this "First Amendment") dated
effective as of May 26, 2004 (the "First Amendment Effective Date"), among THE
HOUSTON EXPLORATION COMPANY, a Delaware corporation (the "Company"); the lenders
party hereto (the "Lenders"); WACHOVIA BANK, NATIONAL ASSOCIATION, as Issuing
Bank and as Administrative Agent (in its capacity as Administrative Agent, the
"Administrative Agent"); THE BANK OF NOVA SCOTIA and FLEET NATIONAL BANK, as
Co-Syndication Agents; and BNP PARIBAS and COMERICA BANK, as Co-Documentation
Agents.

                                    RECITALS:

      A.    The Company, the Lenders, the Administrative Agent, the
Co-Syndication Agents and the Co-Documentation Agents are parties to that
certain Amended and Restated Credit Agreement dated as of April 1, 2004 (the
"Credit Agreement").

      B.    The parties to the Credit Agreement intend to amend the Credit
Agreement to, among other things, amend Sections 7.07 (Use of Loans), 7.14
(Subsidiaries and Partnerships), 9.05 (Investments), 9.06 (Dividends), 9.07
(Sale of Assets), 9.08 (Stock of Subsidiaries, Etc.), 9.09 (Transactions with
Affiliates) and 9.15 (Sale of Oil and Gas Properties), to permit the KeySpan
Split-Off (as hereinafter defined).

      C.    Therefore, in consideration of the mutual covenants and agreements
herein contained, the parties hereto hereby agree as follows:

      SECTION 1. Defined Terms. Except as amended hereby, terms used herein when
defined in the Credit Agreement shall have the same meanings herein unless the
context otherwise requires.

      SECTION 2. Amendments to Credit Agreement.

            (a)   Definitions. The term "Agreement", defined in Section 1.02 of
the Credit Agreement, is hereby amended in its entirety to read as follows:

                  "Agreement" shall mean this Amended and Restated Credit
            Agreement, as amended by the First Amendment, and as the same may be
            further amended, supplemented, waived or otherwise modified from
            time to time in accordance herewith.

            (b)   New Definitions. Section 1.02 of the Credit Agreement is
hereby further amended by adding thereto the following new definitions in their
appropriate alphabetical order:

<PAGE>

                  "Appalachian Assets" shall mean all of the Company's Oil and
            Gas Properties located in the States of West Virginia, New York and
            Pennsylvania that are owned by Seneca-Upshur at the time of the
            closing of the KeySpan Split-Off.

                  "First Amendment" shall mean that certain First Amendment to
            Amended and Restated Credit Agreement dated effective as of May 26,
            2004 (the "First Amendment Effective Date"), among the Company, the
            Lenders party thereto, the Administrative Agent, the Issuing Bank,
            the Co-Syndication Agents and the Co-Documentation Agents.

                  "KeySpan Split-Off" shall mean the series of transactions
            whereby the Company will:

                        (a)   offer 6,200,000 shares of its common stock to the
            public pursuant to the Offering;

                        (b)   contribute (i) the net proceeds of the Offering,
            (ii) up to an aggregate principal amount not to exceed $150,000,000
            in proceeds of Loans under this Agreement, and (iii) all of the
            Appalachian Assets, to Seneca-Upsur;

                        (c)   transfer all of the issued and outstanding shares
            of the common stock of Seneca-Upsur to KeySpan in exchange for not
            less than 10,800,000 shares of the common stock of the Company owned
            by KeySpan;

                        (d)   retire the shares of its common stock received
            from KeySpan; and

                        (e)   if the underwriters of the Offering exercise their
            option to purchase up to an additional 15% of the Company's common
            stock to cover over-allotments, the net proceeds of such purchase
            will be used to, among other things, acquire and retire up to an
            additional 310,000 shares of the common stock of the Company owned
            by KeySpan.

                  "Offering" shall mean the public offering of common stock of
            the Company scheduled to occur on or about June 2, 2004.

                  "Seneca-Upshur" shall mean Seneca-Upshur Petroleum, Inc., a
            West Virginia corporation, a wholly-owned Subsidiary of the Company.

            (c)   Borrowing Base. Notwithstanding anything to the contrary
contained in the Credit Agreement including, without limitation, the provisions
of Section 2.09 thereof, it is hereby expressly understood and agreed that,
during the period from and after the First Amendment Effective Date until the
next Scheduled Redetermination of the Borrowing Base in accordance with said
Section 2.09, the amount of the Borrowing Base shall be $340,000,000.

                                      -2-
<PAGE>

            (d)   Use of Loans. Section 7.07 of the Credit Agreement is hereby
amended in its entirety to read as follows:

                  "Section 7.07 Use of Loans. The proceeds of the Loans shall be
            used by the Company (i) to pay in full the indebtedness of the
            Company under the Existing Credit Agreement, (ii) to contribute an
            aggregate principal amount not to exceed $150,000,000 to
            Seneca-Upshur in connection with the KeySpan Split-Off, (iii) to
            provide working capital for the Company and its Subsidiaries, and
            (iv) for general corporate purposes, including acquisitions of Oil
            and Gas Properties and related items used or useful in connection
            with the Company's existing business. Neither the Company nor any
            Subsidiary is engaged principally, or as one of its important
            activities, in the business of extending credit for the purpose,
            whether immediate, incidental or ultimate, of buying or carrying
            margin stock (within the meaning of Regulation U or X of the Board
            of Governors of the Federal Reserve System) and no part of the
            proceeds of any Loan hereunder will be used to buy or carry any
            margin stock."

            (e)   Subsidiaries and Partnerships. Section 7.14 of the Credit
Agreement is hereby amended by adding thereto a new sentence, to be the last
full sentence thereof, to read in its entirety as follows:

                  "For purposes of clarification, immediately following the
            exchange of the common stock of Seneca-Upshur for certain shares of
            the common stock of the Company owned by KeySpan in connection with
            the KeySpan Split-Off, the Company will have no Subsidiaries."

            (f)   Investments. Section 9.05 of the Credit Agreement is hereby
amended in its entirety to read as follows:

                  "Section 9.05 Investments. Make, or permit any of its
            Subsidiaries to make, any loan or advance to any Person or purchase
            or otherwise acquire, or permit any such Subsidiary to purchase or
            otherwise acquire, any capital stock, assets, obligations or other
            securities of, make any capital contribution to, or otherwise invest
            in, or acquire any interest in, any Person, except: (a) direct
            obligations of the United States of America or any agency thereof
            with maturities of one year or less from the date of acquisition;
            (b) commercial paper of a domestic issuer rated at least "A-2" by
            Standard & Poor's

                                      -3-
<PAGE>

            Ratings Group, a division of The McGraw-Hill Companies, Inc. or
            "P-2" by Moody's Investors Service, Inc. with maturities of one year
            or less from the date of issuance; (c) certificates of deposit with
            maturities of one year or less from the date of acquisition issued
            by any Lender or any commercial bank operating within the United
            States of America having capital and surplus in excess of
            $50,000,000; (d) short term deposits in money market funds investing
            substantially in investments described in Sections 9.05(a), 9.05(b)
            or 9.05(c) and the fund has an investment grade rating by Standard &
            Poor's Ratings Group, a division of The McGraw-Hill Companies, Inc.
            or Moody's Investors Service, Inc. or is listed on Schedule 9.05 (or
            comparable funds to those listed on Schedule 9.05); (e) for stock,
            obligations or securities received in settlement of debts (created
            in the ordinary course of business) owing to the Company or any such
            Subsidiary; (f) loans and advances to any Guarantor; (g) loans and
            advances to employees in the ordinary course of business not to
            exceed $50,000 in the aggregate at any one time outstanding; (h)
            financing for interests in Properties assigned or conveyed by the
            Company to executives of the Company pursuant to employment
            agreements existing on the date hereof between such executives and
            the Company; (i) the Company's contributions to Seneca-Upshur in
            connection with the KeySpan Split-Off, more particularly described
            in the definition of "KeySpan Split-Off"; and (j) the Company's
            acquisition of the shares of its common stock owned by KeySpan in
            connection with the KeySpan Split-Off."

            (g)   Dividends. Section 9.06 of the Credit Agreement is hereby
amended in its entirety to read as follows:

                  "Section 9.06 Dividends. Declare or pay any dividends,
            purchase, redeem, retire or otherwise acquire for value any of its
            capital stock now or hereafter outstanding, or make any distribution
            of assets to its stockholders as such whether in cash, assets or in
            obligations of the Company, or allocate or otherwise set apart any
            sum for the payment of any dividend or distribution on, or for the
            purchase, redemption or retirement of any shares of its capital
            stock, or make any other distribution by reduction of capital or
            otherwise in respect of any shares of its capital stock or permit
            any of its Subsidiaries to purchase or otherwise acquire for value
            any stock of the Company or another such Subsidiary, except that the
            Company may (a) declare and pay cash dividends equal to 50% of net
            income over the most recent previous four quarters, if, after giving
            effect to such dividend (i) no Event of Default has occurred and is
            continuing, (ii) no Event of Default will be caused by such action,
            (iii) the Borrowing Base Utilization is less than 80%, and (iv) the
            Company has a ratio of Consolidated Funded Debt to Consolidated
            Total Capitalization of less than 55%; and (b) acquire and retire
            the shares of its common stock owned by KeySpan in connection with
            the KeySpan Split-Off."

            (h)   Sale of Assets. Section 9.07 of the Credit Agreement is hereby
amended in its entirety as follows:

                  "Section 9.07 Sale of Assets. Without the prior written
            consent of all of the Lenders, sell, lease, assign, transfer or
            otherwise dispose of, or permit any of its Subsidiaries to sell,
            lease, assign, transfer or otherwise dispose of, any of its now
            owned or hereafter acquired assets (including, without limitation,
            shares of stock and indebtedness of such Subsidiaries, receivables
            and leasehold interests); except: (a) for Oil and Gas Properties

                                      -4-
<PAGE>

            pursuant to Section 9.15, (b) for inventory disposed of in the
            ordinary course of business; (c) the sale or other disposition of
            assets no longer used or useful in the conduct of its business; (d)
            that any such Subsidiary may sell, lease, assign, or otherwise
            transfer its assets to the Company or any other Subsidiary; (e) any
            sale, lease, assignment, transfer or other disposition of Properties
            pursuant to employment agreements with executives of the Company;
            (f) the Company's transfer to Seneca-Upshur of (i) the Appalachian
            Assets, (ii) the net proceeds of the Offering, and (iii) up to an
            aggregate principal amount not to exceed $150,000,000 in Loan
            proceeds, each in connection with the KeySpan Split-Off; and (g) the
            Company's exchange of the common stock of Seneca-Upshur for the
            shares of its common stock owned by KeySpan in connection with the
            KeySpan Split-Off."

            (i)   Stock of Subsidiaries, Etc. Section 9.08 of the Credit
Agreement is hereby amended in its entirety to read as follows:

                  "Section 9.08 Stock of Subsidiaries, Etc. Sell or otherwise
            dispose of any shares of capital stock of any of its Subsidiaries,
            except (a) in connection with a transaction permitted under Section
            9.10, and (b) as contemplated in connection with the KeySpan
            Split-Off; or permit any such Subsidiary to issue any additional
            shares of its capital stock, except (a) directors' qualifying
            shares, and (b) shares of its capital stock issued to the Company or
            another Subsidiary."

            (j)   Transactions with Affiliates. Section 9.09 of the Credit
Agreement is hereby amended as follows:

                  "Section 9.09 Transactions with Affiliates. Enter into any
            transaction, including, without limitation, the purchase, sale or
            exchange of Property or the rendering of any service, with any
            Affiliate or permit any of its Subsidiaries to enter into any
            transaction, including, without limitation, the purchase, sale or
            exchange of property or the rendering of any service, with any
            Affiliate, except (a) in the ordinary course of and pursuant to the
            reasonable requirements of the Company's or such Subsidiary's
            business and upon fair and reasonable terms no less favorable to the
            Company or such Subsidiary than would obtain in a comparable arm's
            length transaction with a Person not an Affiliate, (b) for the sale,
            lease, assignment, transfer or other disposition of Properties
            pursuant to employment agreements existing on the date hereof with
            executives of the Company, and (c) in connection with the KeySpan
            Split-Off."

            (k)   Sale of Oil and Gas Properties. Section 9.15 of the Credit
Agreement is hereby amended in its entirety to read as follows:

                  "Section 9.15. Sale of Oil and Gas Properties. The Company
            will not, nor permit any Subsidiary or Affiliate to sell,

                                      -5-
<PAGE>

            assign, transfer or convey any interest in any Oil and Gas
            Properties, except as follows:

                  (a)   Hydrocarbons sold in the ordinary course of business as
            and when produced;

                  (b)   Routine farm-outs of non-proven acreage;

                  (c)   Sales of Properties, provided the sales of all such
            Properties permitted under this clause since the date of the last
            Scheduled Redetermination of the Borrowing Base do not have a market
            value in excess of $25,000,000 in the aggregate;

                  (d)   In addition to sales permitted above, sales of
            Properties included in the Borrowing Base, provided simultaneously
            with any such sale the Borrowing Base is reduced by amounts agreed
            to at the time by the Required Lenders; and

                  (e)   The transfer of the Appalachian Assets to Seneca-Upshur
            and thereafter the transfer of the common stock of Seneca-Upshur to
            KeySpan, each in connection with the KeySpan Split-Off."

            (l)   Other. The Administrative Agent and the Lenders hereby waive
any Default which may occur under any other term or provision of the Credit
Agreement not amended hereby, solely by reason of the KeySpan Split-Off as
contemplated on the First Amendment Effective Date.

      SECTION 3. Conditions Precedent; Effectiveness. This First Amendment shall
become effective as of the First Amendment Effective Date when the
Administrative Agent shall have received:

                  (i)   Counterparts hereof duly executed by the Company and the
      Required Lenders (or, in the case of any party as to which an executed
      counterpart shall not have been received, telegraphic, telex, or other
      written confirmation from such party of execution of a counterpart hereof
      by such party); and

                  (ii)  The Administrative Agent shall have received such other
      documents as the Administrative Agent or special counsel to the
      Administrative Agent may reasonably request.

      SECTION 4. Reaffirmation of Representations and Warranties. To induce the
Lenders, the Administrative Agent and the Issuing Bank to enter into this First
Amendment, the Company hereby reaffirms, as of the date hereof, its
representations and warranties in their entirety contained in Article VII of the
Credit Agreement, as amended by this First Amendment, and in all other documents
executed pursuant thereto (except to the extent such representations and
warranties relate solely to an earlier date).

                                      -6-
<PAGE>

      SECTION 5. Reaffirmation of Credit Agreement. This First 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.

      SECTION 6. Governing Law; Entire Agreement. This First Amendment shall be
governed by, and construed in accordance with, the laws of the State of Texas.
The Credit Agreement, as amended by this First Amendment, the Notes and the
other Loan Documents constitute the entire understanding among the parties
hereto with respect to the subject matter hereof and supersede any prior
agreements, written or oral, with respect thereto.

      SECTION 7. Severability of Provisions. Any provision in this First
Amendment that is held to be inoperative, unenforceable, or invalid in any
jurisdiction shall, as to that jurisdiction, be inoperative, unenforceable, or
invalid without affecting the remaining provisions in that jurisdiction or the
operation, enforceability, or validity of that provision in any other
jurisdiction, and to this end the provisions of this First Amendment are
declared to be severable.

      SECTION 8. Counterparts. This First Amendment may be executed in any
number of counterparts, all of which taken together shall constitute one
agreement, and any of the parties hereto may execute this First Amendment by
signing any such counterpart.

      SECTION 9. Headings. Article and section headings in this First Amendment
are for convenience of reference only, and shall not govern the interpretation
of any of the provisions of this First Amendment.

      SECTION 10. Successors and Assigns. This First Amendment shall be binding
upon and inure to the benefit of the parties hereto and their respective
successors and assigns.

                         [Signatures begin on next page]

                                      -7-
<PAGE>

         IN WITNESS WHEREOF, the parties hereto have executed this First
Amendment effective as of the First Amendment Effective Date.

      COMPANY:

                              THE HOUSTON EXPLORATION COMPANY

                              By:      /s/ John H. Karnes
                                       ------------------------------
                              Name:    John H. Karnes
                              Title:   Sr. VP and Chief Financial Officer

                              LENDERS AND AGENTS:

                              WACHOVIA BANK, NATIONAL ASSOCIATION,
                              Individually as a Lender, the Issuing Bank and as
                              Administrative Agent

                              By:   /s/ David Humphreys
                                    --------------------------------
                              Name: David Humphreys
                              Title: Director

                              THE BANK OF NOVA SCOTIA, Individually as a
                              Lender and as Co-Syndication Agent

                              By:      /s/ V.H. Gibson
                                       ------------------------------
                              Name:    V.H. Gibson
                              Title:

                              FLEET NATIONAL BANK, Individually as a Lender
                              and as Co-Syndication Agent

                              By:      /s/ Allison I. Rossi
                                       ------------------------------
                              Name:    Allison I. Rossi
                              Title:   Director

                              BNP PARIBAS, Individually as a Lender and as
                              Co-Documentation Agent

                              By:      /s/ Mark A. Cox
                                       ------------------------------
                              Name:    Mark A. Cox
                              Title:   Director

                              By:      /s/ Gabe Ellisor
                                       ------------------------------
                              Name:    Gabe Ellisor
                              Title:   Vice President

                              COMERICA BANK, Individually as a Lender and as
                              Co-Documentation Agent

                              By:      /s/ H. Vadgama
                                       ------------------------------
                              Name:    Huma Vadgama
                              Title:   Assistant Vice President

<PAGE>

                              THE BANK OF NEW YORK

                              By:      /s/ Craig J. Anderson
                                       ------------------------------
                              Name:    Craig J. Anderson
                              Title:   Vice President

                              COMPASS BANK

                              By:      /s/ Patrick McWilliams
                                       ------------------------------
                              Name:    Patrick McWilliams
                              Title:   Assistant Vice President

                              WASHINGTON MUTUAL BANK, FA

                              By:      /s/ Mark Isensee
                                       ------------------------------
                              Name:    Mark Isensee
                              Title:   Vice President

                              UNION BANK OF CALIFORNIA, N.A.

                              By:      /s/ Sean Murphy
                                       ------------------------------
                              Name:    Sean Murphy
                              Title:   Vice President

                              NATEXIS BANQUES POPULAIRES

                              By:      /s/ Donovan C. Broussard
                                       ------------------------------
                              Name:    Donovan C. Broussard
                              Title:   Vice President & Manager

By:                           By:      /s/ Timothy Polvado
                                       ------------------------------
                              Name:    Timothy Polvado
                              Title:   Vice President & Manager

                              WELLS FARGO BANK TEXAS, N.A.

                              By:      /s/ Carlos L. Quinteros
                                       ------------------------------
                              Name:    Carlos L. Quinteros
                              Title:   Relationship Manager

                              SOUTHWEST BANK OF TEXAS, N.A.

                              By:      /s/ W. Bryan Chapman
                                       ------------------------------
                              Name:    W. Bryan Chapman
                              Title:   Senior Vice President Energy Lending