<PAGE>
                                                                    EXHIBIT 10.1



                               FOURTH AMENDMENT TO
                      AMENDED AND RESTATED CREDIT AGREEMENT


         THIS FOURTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (the
"Amendment") is made and entered into effective as of October 14, 2004, by and
among PETROQUEST ENERGY, L.L.C., a Louisiana limited liability company
("Borrower"); PETROQUEST ENERGY, INC., a Delaware corporation ("Guarantor");
BANK ONE, NA, a national banking association, (individually as a lender and as
agent, ("Bank One").

                                R E C I T A L S:

         WHEREAS, Borrower, Guarantor, Bank One and Union Bank of California
entered into an Amended and Restated Credit Agreement dated May 14, 2003 (which
as the same may have been and be amended from time to time is herein called the
("Credit Agreement"), pursuant to which Borrower amended and restated a
previously existing credit facility dated May 11, 2001; and

         WHEREAS, Union Bank of California has, by Assignment dated December 23,
2003, assigned and conveyed to Bank One all of its interest in the Credit
Agreement; and

         WHEREAS, Borrower, Guarantor and Bank One desire to amend the Credit
Agreement as herein set forth.

         NOW THEREFORE, in consideration of the premises herein contained and
other good and valuable consideration, the receipt and sufficiency of which are
hereby acknowledged, the parties hereto agree as follows:

         1. Definitions. Except as otherwise provided below, unless the context
hereof indicates otherwise, all capitalized terms used herein shall have the
same meaning as such capitalized terms are defined in the Credit Agreement.

                  (a) The following defined terms set forth in Article I of the
         Credit Agreement are hereby amended as follows:

                           "Borrowing Base Reduction Amount" means (a)
                  $1,500,000 for each of December 1, 2004 and January 1, 2005;
                  (b) for each month commencing February 1, 2005 until the next
                  semi-annual Borrowing Base redetermination pursuant to Section
                  2.2.2, $2,000,000, and (c) for each month thereafter, such
                  amount as designated by the Required Lenders in a notice to
                  Borrower from time to time in connection with each successive
                  scheduled semi-annual Borrowing Base redetermination pursuant
                  to Section 2.2.2 or successive unscheduled Borrowing Base
                  redetermination pursuant to Section 2.2.3.; provided however,
                  if the Required Lenders fail to timely designate a new
                  Borrowing Base Reduction Amount, then the Borrowing Base
                  Reduction Amount most recently in effect will continue in
                  effect until the Required Lenders designate a new Borrowing
                  Base Reduction Amount."
<PAGE>

                           "Guarantor" means individually and collectively (i)
                  PetroQuest Energy, Inc., a Delaware corporation; (ii)
                  Pittrans, Inc., an Oklahoma corporation; and (iii) their
                  respective successors and assigns.

                           "Required Lenders" means (i) Lenders having 100% of
                  the Aggregate Commitment if there are only two or fewer
                  Lenders; or (ii) Lenders in the aggregate having at least 66?%
                  of the Aggregate Commitment if there are more than two or more
                  Lenders or, (iii) if the Aggregate Commitment has been
                  terminated, Lenders in the aggregate holding at least 66?% of
                  the aggregate unpaid principal amount of the outstanding
                  Advances.

                  (b) Article I of the Credit Agreement is hereby amended by
         adding the following new defined terms and their definitions in proper
         alphabetical sequence as follows:

                           "SJM Acquisition Agreement" means that certain
                  Purchase and Sale Agreement among SJM Inc., William W. Rush,
                  Michael R. Coast and Roy M. Teel, Jr., as Sellers, and
                  Borrower, as Buyer, as amended and supplemented by supplement
                  and amendment to the Purchase and Sale Agreement dated October
                  14, 2004 regarding the purchase by Borrower of Oil & Gas
                  Properties located in Pittsburg, Atoka, McIntosh and McClain
                  Counties , Oklahoma and the purchase of all of the issued and
                  outstanding shares of Pittrans.

                           "Pittrans" means Pittrans, Inc., an Oklahoma
                  corporation, which after Closing, pursuant to the SJM
                  Acquisition Agreement, will be a Wholly Owned Subsidiary of
                  Borrower.

         2. Amendments to the Credit Agreement. The Credit Agreement is,
effective the date hereof, and subject to the satisfaction of the conditions
precedent set forth in Section 3 hereof, hereby amended as follows:

                  (a) Section 2.2.1 Borrowing Base, of the Credit Agreement is
         hereby amended by deleting the section in its entirety and substituting
         the following:

                           "2.2.1 Effective October 14, 2004 to the date as of
                  which the Borrowing Base is next redetermined pursuant to
                  Section 2.2.2, the Borrowing Base shall be $38,000,000.00."

                  (b) A new Section 5.30 SJM Acquisition Agreement is hereby
         added to the Credit Agreement as follows:

                           "5.30 SJM Acquisition Agreement. The transactions
                  contemplated by the SJM Acquisition Agreement have or will
                  close as contemplated therein and neither Borrower, Guarantor,
                  nor any other party thereto has waived nor shall waive, or in
                  any way amend, without the prior consent of the Agent, the
                  terms of the SJM
<PAGE>
                  Acquisition Agreement, including any condition to the
                  obligations to close as so set forth therein. A true, correct
                  and complete copy of the SJM Acquisition Agreement (including
                  all exhibits, schedules and amendments thereto) has been
                  delivered to Agent and a true, correct and complete copy of
                  each document and instrument delivered at closing of the
                  Acquisition will be delivered to the Agent on the closing date
                  thereof. Neither Borrower, Guarantor, nor any other party
                  thereto is in default under the SJM Acquisition Agreement or
                  any document or instrument to be delivered in connection with
                  the SJM Acquisition Agreement executed in connection
                  therewith. The representations and warranties made by each of
                  the parties in the SJM Acquisition Agreement and any other
                  document or instrument will be true and correct (except for
                  changes expressly provided for therein or herein) on and as of
                  the closing date as though made on and as of such date."

         3. Conditions Precedent to Effectiveness of Amendment. This Amendment
shall become effective when, and only when, the Agent and Lenders shall have
received counterparts of this Amendment executed by Borrower and Guarantor and
Section 2 hereof shall become effective when, and only when, the Agent and
Lenders shall have additionally received all of the following documents, each
document (unless otherwise indicated) being dated the date of receipt thereof by
Lender (which date shall be the same for all such documents), in form and
substance satisfactory to the Lender:

                  (a) Counterparts of this Amendment duly executed by Borrower,
         Guarantor and Lenders;

                  (b) A copy of the resolutions approving this Amendment, and
         authorizing the transactions contemplated herein or therein duly
         adopted by the Managers of Borrower, accompanied by a certificate of
         the duly authorized Secretary of Borrower, that such copy is a true and
         correct copy of the resolutions duly adopted by the Managers of
         Borrower, and that such resolutions constitute all the resolutions
         adopted with respect to such transactions, and have not been amended,
         modified or revoked in any respect and are in full force and effect as
         of the date hereof;

                  (c) A copy of the resolutions approving this Amendment, and
         authorizing the transactions contemplated herein or therein duly
         adopted by the Board of Directors of Guarantor, accompanied by a
         certificate of the duly authorized Secretary of Guarantor, that such
         copy is a true and correct copy of the resolutions duly adopted by the
         Board of Directors of Guarantor, and that such resolutions constitute
         all the resolutions adopted with respect to such transactions, and have
         not been amended, modified or revoked in any respect and are in full
         force and effect as of the date hereof;

                  (d) Mortgages, executed by the Borrower, in a form
         satisfactory to the Agent, the Lenders and their counsel with respect
         to the Properties purchased by Borrower pursuant to the SJM Acquisition
         Agreement and described therein, which are part of the Collateral, and
         such other agreements, documents and instruments as may be necessary
         and appropriate, in form and substance satisfactory to the Agent and
         the Lenders, executed and delivered by the
<PAGE>

         Borrower, as mortgagor or assignor, in favor of the Agent, ratably for
         the benefit of the Lenders, in order to create and perfect the Lender
         Liens in and to all Collateral described therein;

                  (e) The Pledge Agreement, executed by Borrower, in a form
         satisfactory to the Agent, the Lenders and their counsel, with respect
         to the shares of Pittrans along with one or more certificates
         evidencing such shares having attached thereto duly executed stock
         powers and any financing statements related thereto.

                  (f) A Guaranty, executed by Pittrans, in a form satisfactory
         to the Agent, the Lenders, and their counsel;

                  (g) There shall not have been, in the sole judgment of
         Lenders, any material adverse change in the financial condition,
         business or operations of Borrower or Guarantor;

                  (h) Payment of a fees as set forth in the Fee Letter executed
         by Borrower in connection with this Amendment;

                  (i) Payment by Borrower of the fees and expenses of counsel to
         Lenders in connection with the preparation and negotiation of this
         Amendment and all documents and instruments contemplated hereby; and

                  (j) The execution and delivery of such additional documents
         and instruments which the Agent and its counsel may deem necessary to
         effectuate this Amendment or any document executed and delivered to
         Lenders in connection herewith or therewith.

         4. Representations and Warranties of Borrower. Borrower represents and
warrants as follows:

                  (a) Borrower and Guarantor are each duly authorized and
         empowered to execute, deliver and perform this Amendment and all other
         instruments referred to or mentioned herein to which it is a party, and
         all action on its part requisite for the due execution, delivery and
         the performance of this Amendment has been duly and effectively taken.
         This Amendment, when executed and delivered, will constitute valid and
         binding obligations of Borrower and Guarantor, as the case may be,
         enforceable against such party in accordance with its terms. This
         Amendment does not violate any provisions of the Articles of
         Organization or limited liability agreement of Borrower, the
         Certificate of Incorporation or By-Laws of Guarantor, or any contract,
         agreement, law or regulation to which either Borrower or Guarantor is
         subject, and does not require the consent or approval of any regulatory
         authority or governmental body of the United States or any state;

                  (b) After giving affect to this Amendment, the representations
         and warranties contained in the Credit Agreement, as amended hereby,
         and any other Loan Documents executed in connection herewith or
         therewith are true, correct and complete on and as of the date hereof
         as though made on and as of the date hereof;
<PAGE>
                  (c) After giving affect to this Amendment, no event has
         occurred and is continuing which constitutes a Default or Unmatured
         Default; and

                  (d) When duly executed and delivered, each of this Amendment
         and the Credit Agreement will be legal and binding obligations of
         Borrower, enforceable in accordance with their respective terms, except
         as limited by bankruptcy, insolvency or similar laws of general
         application relating to the enforcement of creditors' rights and by
         equitable principles of general application.

         5. Reference to and Effect on the Loan Documents.

                  (a) Upon the effectiveness of Section 2 hereof, on and after
         the date hereof, each reference in the Credit Agreement to "this
         Agreement", "hereunder", "hereof", "herein" or words of like import,
         and each reference in the Loan Documents shall mean and be a reference
         to the Credit Agreement as amended hereby.

                  (b) Except as specifically amended above, the Credit Agreement
         and the Note(s), and all other instruments securing or guaranteeing
         Borrower's obligations to Lenders, including the Collateral Documents,
         as amended (collectively, the "Security Instruments") shall remain in
         full force and effect and are hereby ratified and confirmed. Without
         limiting the generality of the foregoing, the Security Instruments and
         all collateral described therein do and shall continue to secure the
         payment of all obligations of Borrower and Guarantor under the Credit
         Agreement and the Note(s), as amended hereby, and under the other
         Security Instruments.

                  (c) The execution, delivery and effectiveness of this
         Amendment shall not, except as expressly provided herein, operate as a
         waiver of any right, power or remedy of Lender under any of the
         Security Instruments, nor constitute a waiver of any provision of any
         of the Security Instruments.

         6. Waiver. As additional consideration for the execution, delivery and
performance of this Amendment by the parties hereto and to induce Lenders to
enter into this Amendment, Borrower and Guarantor each warrants and represents
to Lenders that no facts, events, statuses or conditions exist or have existed
which, either now or with the passage of time or giving of notice, or both,
constitute or will constitute a basis for any claim or cause of action against
Lenders or any defense to (i) the payment of any obligations and indebtedness
under the Note(s) and/or the Security Instruments, or (ii) the performance of
any of its obligations with respect to the Note(s) and/or the Security
Instruments, and in the event any such facts, events, statuses or conditions
exist or have existed, Borrower unconditionally and irrevocably waives any and
all claims and causes of action against Lenders and any defenses to its payment
and performance obligations in respect to the Note(s) and the Security
Instruments.

         7. Costs and Expenses. Borrower agrees to pay on demand all costs and
expenses of Lenders in connection with the preparation, reproduction, execution
and delivery of this Amendment and the other instruments and documents to be
delivered hereunder, including the reasonable fees and out-of-pocket expenses of
counsel for Lenders. In addition, Borrower shall pay any and all fees
<PAGE>

payable or determined to be payable in connection with the execution and
delivery, filing or recording of this Amendment and the other instruments and
documents to be delivered hereunder, and agrees to save Lenders harmless from
and against any and all liabilities with respect to or resulting from any delay
in paying or omitting to pay such fees.

         8. Execution in Counterparts. This Amendment may be executed in any
number of counterparts and by different parties hereto in separate counterparts,
each of which when so executed and delivered shall be deemed to be an original
and all of which taken together shall constitute but one and the same
instrument.

         9. Governing Law. This Amendment shall be governed by and construed in
accordance with the laws of the State of Texas.

         10. Final Agreement. THIS WRITTEN AMENDMENT REPRESENTS 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
UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]


<PAGE>


         IN WITNESS WHEREOF, the parties hereto have caused this instrument to
be duly executed in multiple counterparts, each of which is an original
instrument for all purposes, all as of the day and year first above written.

                                      "BORROWER"

                                       PETROQUEST ENERGY, L.L.C.



                                       By: /s/ Michael O. Aldridge
                                          --------------------------------------
                                               Michael O. Aldridge,
                                               Chief Financial Officer


                                       "GUARANTOR"

                                       PETROQUEST ENERGY, INC.



                                       By: /s/ Michael O. Aldridge
                                          --------------------------------------
                                               Michael O. Aldridge,
                                               Chief Financial Officer



<PAGE>



                                       "LENDERS"

                                       BANK ONE, NA,
                                       As the Agent, a Lender and LC Issuer



                                       By: /s/ Charles Kingswell-Smith
                                          --------------------------------------
                                               Charles Kingswell-Smith
                                               Managing Director