<PAGE>
                                                                   EXHIBIT 12.2 
                     SECOND AMENDMENT TO CREDIT AGREEMENT

     THIS SECOND AMENDMENT TO CREDIT AGREEMENT (herein called this "Amendment")
is made as of the l7th day of February, 1999 by and among Western Gas Resources,
Inc. ("Borrower") and NationsBank, N.A., successor by merger to NationsBank of
Texas, N.A., as Agent ("Agent"), and the Lenders referred to in the Original
Agreement (as defined below).

                                  WITNESSETH:

     WHEREAS, Borrower, Agent and Lenders have entered into that certain Credit
Agreement dated as of May 30, 1997 (as amended, restated, or supplemented to the
date hereof, the "Original Agreement"), for the purposes and consideration
therein expressed, pursuant to which Lenders made and became obligated to make
loans to Borrower as therein provided; and

     WHEREAS, Borrower, Agent and Lenders desire to amend the Original Agreement
to for the purposes set forth herein;

     NOW, THEREFORE, in consideration of the premises and the mutual covenants
and agreements contained herein and in the Original Agreement, in consideration
of the loans which may hereafter be made by Lenders to Borrower, and for other
good and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereto do hereby agree as follows:

                                  ARTICLE I.

                          Definitions and References
                          --------------------------

     Section 1.1  Terms Defined in the Original Agreement. Unless the context
                  ---------------------------------------
otherwise requires or unless otherwise expressly defined herein, the terms
defined in the Original Agreement shall have the same meanings whenever used in
this Amendment. The following term shall have the following meaning when used
herein:

     "Credit Agreement" means the Original Agreement as amended hereby.
      ----------------
<PAGE>
 
                                  ARTICLE II.

                        Amendments, Consent, and Waiver
                        -------------------------------

     Section 2.1  Defined Terms.
                  -------------
     (a)  The following defined terms in Section 1.1 of the Original Agreement
are hereby amended in their entirety to read as follows:

          "Base Rate" means the per annum rate of interest equal to the sum of
           ---------
    (i) the greater of (A) the Prime Rate from time to time in effect or (B) the
    Federal Funds Rate from time to time in effect plus one-half of one percent
    (.50%), and (ii) the Base Rate Spread. If the Prime Rate or the Federal
    Funds Rate, as the case may be, changes after the date hereof the Base Rate
    shall be automatically increased or decreased, as the case may be, without
    notice to Borrower from time to time as of the effective time of each such
    change. The Base Rate shall in no event, however, exceed the Highest Lawful
    Rate."

          "Eurodollar Spread" means, with respect to each Committed Eurodollar
           -----------------
    Loan:

          (a) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is less than or equal to .35 to 1.0, .60%;

          (b) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .3 5 to 1.0 but less than
     or equal to .45 to 1.0, .80%;

          (c) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .45 to 1.0 but less than or
     equal to .50 to 1.0, 1.00%;

          (d) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .50 to 1.0 but less than or
     equal to .55 to 1.0, 1.20%; and

          (e) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .55 to 1.0, 1.25%."

     (b)  The following terms are hereby added to Section 1. 1 of the Original
Agreement:

"Base Rate Spread" means:
 ----------------

          (a) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is less than or equal to .50 to 1.0, 0.00%;

          (b) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .50 to 1.0 but less than or
     equal to .55 to 1.0, .25%; and

                                      -2-
<PAGE>
 
          (c) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .55 to 1.0, .50%."

          "Bridge Facility" means that certain Loan Agreement among Borrower, as
           ---------------
     borrower, and NationsBank, N.A., as lender, dated as of February 17th,
     1999."

     Section 2.2.  Facility Fees.  Section 2.9 of the Original  Agreement is
                   -------------
hereby amended in its entirety to read as follows:

          "Facility Fees. In consideration of Lenders' commitment to enter into
           -------------
     this Agreement and to advance funds to Borrower hereunder, Borrower will
     pay to Agent, for pro rata distribution to each Lender in accordance with
     its Percentage Share, a facility fee determined on a daily basis by
     multiplying the amount of $300,000,000 by a rate of

          (a) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is less than or equal to .35 to 1.0, .15%
     per annum;

          (b) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .35 to 1.0 but less than or
     equal to .45 to 1.0, .20% per annum;

          (c) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .45 to 1.0 but less than or
     equal to .50 to 1.0, .25% per annum;

          (d) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than.50 to 1.0 but less than or
     equal to .55 to 1.0, .30% per annum; and

          (e) for each period in which the Debt to Capitalization Ratio in
     effect pursuant to Section 2.17 is greater than .55 to 1.0, .50% per annum.

          Promptly at the end of each Fiscal Quarter Agent shall calculate the
     facility fee then due and shall notify Borrower thereof. Borrower shall pay
     such facility fee to Agent within five Business Days after receiving such
     notice."

     Section 2.3.  Debt. Section  6.2(a) of the Original Agreement is hereby
                   ----
amended by adding the following subsection as a new subsection (ix) and
renumbering subsection (ix) in the Original Agreement as subsection (x) to read
as follows:

          "(ix) Debt under the Bridge Facility the principal amount of which
     shall not exceed $37,000,000 at any one time outstanding.

                                      -3-
<PAGE>
 
          (x)  miscellaneous items of Debt not described in subsections (i)
     through (ix) of this subsection (a) which do not in the aggregate (taking
     into account all Debt of all Related Persons) exceed $5,000,000 at any one
     time outstanding."

     Section 2.4.  Waiver and Consent. Subject to the terms and conditions
                   ------------------
contained herein, each Lender hereby (i) waives any Event of Default arising
solely as a result of the violation by Borrower of Section 6.2(m) of the
Original Agreement for the Fiscal Quarter ending December 31, 1998 and (ii)
consents to one or more prepayments by Borrower of the outstanding principal
balance of the indebtedness owing under the Debt Securities not to exceed the
aggregate amount of $50,000,000.


                                 ARTICLE III.

                          Conditions of Effectiveness
                          ---------------------------

     Section 3.1.  Effective Date. This Amendment shall become effective as
                   --------------
of the date first above written when, and only when, Agent shall have received:

          (a)  all of the following documents, duly authorized, executed and
     delivered by Borrower and Majority Lenders, and in form and substance
     satisfactory to Agent:

                   (i)   This Amendment.

                   (ii)  A certificate of a duly authorized officer of Borrower
          dated the date of this Amendment (A) to the effect that all of the
          representations and warranties set forth in Article IV hereof are true
          and correct at and as of the time of such effectiveness and (B)
          certifying that attached thereto is a true and complete copy of
          resolutions adopted by the Board of Directors of Borrower authorizing
          the execution, delivery and performance of this Amendment and
          certifying the names and true signatures of the officers of Borrower
          authorized to sign this Amendment.

                   (iii) Such supporting documents as Agent may reasonably
          request.

          (b)  A waiver and amendment fee in the amount of $280,000 in
     immediately available funds for pro rata distribution to each Lender (other
     than Bank of Montreal) in accordance with such Lenders' Percentage Share.

                                      -4-
<PAGE>
 
                                  ARTICLE IV.

                        Representations and Warranties
                        ------------------------------

     Section 4.1.  Representations and Warranties of Borrower. In order to
                   ------------------------------------------
induce each Lender to enter into this Amendment, Borrower represents and
warrants to each Lender that:

          (a)  The representations and warranties contained in Section 5.1 of
     the Original Agreement are true and correct at and as of the time of the
     effectiveness hereof (except as such representations and warranties have
     been modified by the transactions contemplated herein).

          (b)  Borrower is duly authorized to execute and deliver this
     Amendment and Borrower is and will continue to be duly authorized to borrow
     monies and to perform its obligations under the Credit Agreement. Borrower
     has duly taken all corporate and action necessary to authorize the
     execution and delivery of this Amendment.

          (c)  The execution and delivery by Borrower of this Amendment, the
     performance of its obligations thereunder and the consummation of the
     transactions contemplated hereby do not and will not conflict with any
     provision of law, statute, rule or regulation or of the certificate of
     incorporation and bylaws of Borrower or of any material agreement,
     judgment, license, order or permit applicable to or binding upon Borrower
     or result in the creation of any lien, charge or encumbrance upon any
     assets or properties of Borrower. Except for those which have been
     obtained, no consent, approval, authorization or order of any court or
     governmental authority or third party is required in connection with the
     execution and delivery by Borrower and of this Amendment.

          (d)  When duly executed and delivered, this Amendment and the Credit
     Agreement will each be a legal and binding obligation of Borrower
     enforceable in accordance with its 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.

          (e)  The Consolidated financial statements of Borrower dated as of
     September 30, 1998 fairly present the Consolidated financial position at
     such date and the Consolidated statement of operations and the changes in
     Consolidated financial position for the periods ending on such date for
     Borrower. Copies of such financial statements have heretofore been
     delivered to Agent. Since September 30, 1998, no material adverse change
     has occurred in the financial condition or business or in the Consolidated
     financial condition or business of Borrower.

                                      -5-
<PAGE>
 
                                  ARTICLE V.

                                 Miscellaneous
                                 -------------

     Section 5.1.  Ratification of Agreements. The Original Agreement as
                   --------------------------
hereby amended is hereby ratified and confirmed in all respects. Any reference
to the Credit Agreement in any Loan Document shall be deemed to be a reference
to the Original Agreement as hereby amended. The Loan Documents, as they may be
amended or affected hereby, are hereby ratified and confirmed in all respects.
The execution, delivery and effectiveness of this Amendment shall not, except as
expressly provided herein or therein, operate as a waiver of any right, power or
remedy of Lenders under the Credit Agreement, the Notes, or any other Loan
Document nor constitute a waiver of any provision of the Credit Agreement, the
Notes or any other Loan Document.

     Section 5.2.  Survival of Agreements. All representations, warranties,
                   ----------------------
covenants and agreements of Borrower herein shall survive the execution and
delivery of this Amendment and the performance hereof, including without
limitation the making or granting of the Loans, and shall further survive until
all of the Obligations are paid in full. All statements and agreements contained
in any certificate or instrument delivered by Borrower hereunder or under the
Credit Agreement to any Lender shall be deemed to constitute representations and
warranties by, and/or agreements and covenants of, Borrower under this Amendment
and under the Credit Agreement.

     Section 5.3.  Loan Documents. This Amendment is a Loan Document, and all
                   --------------
provisions in the Credit Agreement pertaining to Loan Documents apply hereto.

     Section 5.4.  Governing Law. This Amendment shall be governed by and
                   -------------
construed in accordance the laws of the State of Texas and any applicable laws
of the United States of America in all respects, including construction,
validity and performance.

     Section 5.5.  Counterparts. This Amendment may be separately executed in
                   ------------
counterparts and by the different parties hereto in separate counterparts, each
of which when so executed shall be deemed to constitute one and the same
Amendment.

     THIS AMENDMENT 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
UNWRITTEN ORAL AGREEMENTS OF THE PARTIES.

                                      -6-
<PAGE>
 
     IN WITNESS WHEREOF, this Amendment is executed as of the date first above
written.

                                        WESTERN GAS RESOURCES, INC.



                                        By:      /s/ John C. Walter
                                           -----------------------------------
                                           Name:  John C. Walter
                                           Title: Executive Vice President

                                      -7-
<PAGE>
 
                                   NATIONSBANK, N.A., as Agent and a Lender


                                   By:       /s/ David C. Rubenking
                                      --------------------------------------
                                      Name:   David C. Rubenking
                                      Title:  Senior Vice President

                                      -8-
<PAGE>
 
                                        BANK OF AMERICA NATIONAL TRUST 
                                        AND SAVINGS ASSOCIATION


                                        By:      /s/ David C. Rubenking
                                           ----------------------------------
                                           Name:   David C. Rubenking
                                           Title:  Senior Vice President

                                      -9-
<PAGE>
 
                                             BANK OF MONTREAL


                                             By:_______________________________
                                                Name:
                                                Title:

                                      -10-
<PAGE>
 
                                        BANKBOSTON, N.A.


                                        By:      /s/ Terrence Ronan
                                           -----------------------------------
                                           Name:  Terrence Ronan
                                           Title: Director

                                      -11-
<PAGE>
 
                                        CREDIT LYONNAIS NEW YORK BRANCH


                                        By:        /s/ Xavier Ratouis
                                           ----------------------------------
                                           Name:   Xavier Ratouis
                                           Title:  Senior Credit Officer

                                      -12-
<PAGE>
 
                                        CIBC INC.


                                        By:     /s/ Roger Colden
                                           --------------------------------
                                           Name:  Roger Colden
                                           Title: EXECUTIVE DIRECTOR, CIBC
                                                  OPPENHEIMER CORP. AS AGENT

                                      -13-
<PAGE>
 
                                        U.S. BANK NATIONAL ASSOCIATION


                                        By:     /s/ Monte E. Deckerd
                                           ----------------------------------
                                           Name:   Monte E. Deckerd
                                           Title:  Vice President

                                      -14-
<PAGE>
 
                                        SOCIETE GENERALE, SOUTHWEST AGENCY


                                        By:     /s/ Ronald A. Erbert
                                           --------------------------------
                                           Name:   RONALD A. ERBERT
                                           Title:  VICE PRESIDENT

                                      -15-
<PAGE>
 
                                        ABN AMRO BANK N.V.


                                        By:    /s/ Robert J. Cunningham
                                           ----------------------------------
                                           Name:   Robert J. Cunningham
                                           Title:  Group Vice President


                                        By:        /s/ Jamie A. Conn
                                           ----------------------------------
                                           Name:   Jamie A. Conn
                                           Title:  Vice President

                                      -16-
<PAGE>
 
                             CONSENT AND AGREEMENT
                             ---------------------

     Each of the undersigned hereby (i) consents to the provisions of the
Original Agreement as amended by this Amendment and the transactions
contemplated herein, and (ii) ratifies and confirms its respective Guaranty
dated as of May 30, 1997 made by it favor of Agent for the benefit of each
Lender, and agrees that its obligations and covenants thereunder are unimpaired
hereby and thereby and shall remain in full force and effect.

                                       MIGC, INC.


                                       By:    /s/ John C. Walter
                                          --------------------------------------
                                          Name:  John C. Walter
                                          Title: Executive Vice President


                                       MGTC, INC.


                                       By:    /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       WESTERN GAS RESOURCES TEXAS, INC.


                                       By:    /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       WESTERN GAS RESOURCE STORAGE, INC.


                                       By:    /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       MOUNTAIN GAS RESOURCES, INC.


                                       By:    /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President

                                      -17-
<PAGE>
 
                                       WESTERN GAS RESOURCES - OKLAHOMA, INC.


                                       By:     /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       WESTERN POWER SERVICES, INC.


                                       By:     /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       PINNACLE GAS TREATING, INC.


                                       By:     /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President


                                       WGR CANADA, INC.


                                       By:     /s/ John C. Walter
                                          --------------------------------------
                                          Name:   John C. Walter
                                          Title:  Executive Vice President

                                      -18-