<PAGE>   1
                                                                    EXHIBIT 10.2

                     FOURTH AMENDMENT TO GUARANTY AGREEMENT



         THIS FOURTH AMENDMENT TO GUARANTY AGREEMENT (this "Amendment") dated as
of July 19, 1999 is between BRIGHAM EXPLORATION COMPANY, a Delaware corporation
(the "Guarantor") and BANK OF MONTREAL, as agent (the "Agent") for the lenders
(the "Lenders") that are or become parties to the Credit Agreement defined
below.

                                    RECITALS

         A. Brigham Oil & Gas, L.P., a Delaware limited partnership (the
"Borrower"), the Agent and the Lenders as parties to that certain Credit
Agreement dated as of January 26, 1998 as amended by First Amendment to Credit
Agreement dated August 20, 1998 and Second Amendment to Credit Agreement dated
as of March 26, 1999 and that Third Amendment to Credit Agreement of even date
herewith (as so amended, the "Credit Agreement"), pursuant to which the Lenders
agreed to make certain loans and extensions of credit to the Borrower.

         B. Pursuant to the terms and conditions stated in the Credit Agreement,
Guarantor executed that certain Guaranty Agreement dated January 26, 1998 by
Guarantor, as amended by First Amendment to Guaranty Agreement dated March 30,
1998, Second Amendment to Guaranty Agreement dated August 20, 1998 and Third
Amendment to Guaranty Agreement dated March 26, 1999 (as so amended, the
"Guaranty Agreement").

         C. The Guarantor and the Agent now desire to amend certain provisions
of the Guaranty Agreement.

         NOW THEREFORE, in consideration of the mutual covenants and agreements
herein contained, the Guarantor, the Agent and the Lenders hereby agree that the
Guaranty Agreement shall be amended as follows:

         Section 1. Certain Definitions. Unless otherwise defined herein, all
capitalized terms used herein are used with the meanings assigned to such terms
in the Guaranty Agreement.

         Section 2. Amendments to Guaranty Agreement.

                  Section 5.2. Section 5.2 is hereby amended as follows:

                  (a) Section 5.2(q) is hereby deleted in its entirety, and the
         following substituted therefor:

                           "(q) Current Ratio. The Guarantor will not permit its
                  ratio of (i) consolidated current assets of the Guarantor and
                  its Consolidated Subsidiaries to (ii) their consolidated
                  current liabilities (excluding the Indebtedness) to be less
                  than (A) .75 to 1.0 for the quarters ended December 31, 1999
                  and March 31, 2000 or (B) 1.0 to 1.0 at any time thereafter."

                  (b) Section 5.2(s) is hereby deleted in its entirety, and the
         following is substituted therefor:


                                        1
<PAGE>   2


                           "(r) Interest Coverage Ratio. The Guarantor will not
                  permit its Interest Coverage Ratio as of the end of any fiscal
                  quarter of the Guarantor (calculated quarterly at the end of
                  each fiscal quarter) to be less than the ratio set forth below
                  for such period. Interest Coverage Ratio shall mean the ratio
                  of (i) EBITDA to (ii) interest payments accruing (excluding
                  amortizations of fee expense incurred in connection with this
                  Agreement and the closing of the Indenture and Securities
                  Purchase Agreement and any capitalized lease expense included
                  in interest) during the following periods (for purposes hereof
                  interest on the Subordinated Debt shall be deemed cash
                  payments, calculated at the cash interest rate applicable to
                  the Subordinated Debt, whether paid in cash or in kind, except
                  that if a payment of interest is made in kind on any interest
                  payment date applicable to the Subordinated Debt, an amount
                  equal to the cash payment of interest that would have been due
                  on such interest payment date if payment in kind had not been
                  made shall be deemed subtracted from interest expense for the
                  applicable test period ending on the last day of the fiscal
                  quarter preceding such interest payment date (but not for any
                  other test period):

                                (i)    not less than 1.25 to 1.0 for the nine
                                       (9) month period ending March 31, 2000;

                                (ii)   not less than 1.25 to 1.0 for the twelve
                                       (12) month period ending June 30, 2000;

                                (iii)  not less than 1.25 to 1.0 for the twelve
                                       (12) month period ending September 30,
                                       2000;

                                (iv)   not less than 1.5 to 1.0 for the twelve
                                       (12) month period ending December 31,
                                       2000; and

                                (v)    thereafter, not less than 1.75 to 1.0 for
                                       the twelve (12) month periods ending at
                                       the end of each fiscal quarter of the
                                       Guarantor."

         Section 3. Representations and Warranties. The Guarantor hereby
reaffirms that as of the effective date of this Amendment, the representations
and warranties made by the Guarantor in Article III of the Guaranty Agreement
will be true and correct as though made on and as of the effective date of this
Amendment.

         Section 4. Limitations; Ratification. The amendments set forth herein
are limited precisely as written and shall not be deemed to (a) be a consent to,
or waiver or modification of, any other term or condition of the Guaranty
Agreement or any of the other Loan Documents, or (b) prejudice any right or
rights which the Lenders or the Agent may now have or may have in the future
under or in connection with the Guaranty Agreement or any of the other Loan
Documents. Except as expressly supplemented, amended or modified hereby, the
terms and provisions of the Guaranty Agreement or any other Loan Documents are
and shall remain in full


                                        2
<PAGE>   3


force and effect. The Guarantor hereby expressly ratifies and affirms its
obligations under the Guaranty Agreement as amended by this Amendment and agrees
that the Guaranty Agreement as amended by this Amendment remains in full force
and effect. In the event of a conflict between this Amendment and any of the
foregoing documents, the terms of this Amendment shall be controlling.

         Section 5. Governing Law. This Amendment and the rights and obligations
of the parties hereunder and under the Credit Agreement shall be construed in
accordance with, and be governed by, the laws of the State of Texas and the
United States of America.

         Section 6. Descriptive Headings, etc. The descriptive headings of the
several Sections of this Amendment are inserted for convenience only and shall
not be deemed to affect the meaning or construction of any of the provisions
hereof.

         Section 7. Counterparts. This Amendment may be executed in any number
of counterparts and by different parties on separate counterparts and all of
such counterparts shall together constitute one and the same instrument.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]


                                       3
<PAGE>   4


         IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed, delivered and effective as of the date first above written.

               NOTICE PURSUANT TO TEX. BUS. & COMM. CODE SECTION 26.02

         THIS AMENDMENT AND OTHER LOAN DOCUMENTS EXECUTED BY ANY OF THE PARTIES
BEFORE OR SUBSTANTIALLY CONTEMPORANEOUSLY WITH THE EXECUTION HEREOF TOGETHER
CONSTITUTE A WRITTEN LOAN AGREEMENT AND 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 NOT UNWRITTEN ORAL
AGREEMENT BETWEEN THE PARTIES.

GUARANTOR:                                BRIGHAM EXPLORATION COMPANY


                                          By: /s/ CRAIG M. FLEMING
                                             -----------------------------------
                                          Name:  Craig M. Fleming
                                               ---------------------------------
                                          Title: Vice President and CFO
                                                --------------------------------


AGENT AND LENDER:                         BANK OF MONTREAL


                                          By: /s/ THOMAS E. MCGRAW
                                             -----------------------------------
                                             Thomas E. McGraw
                                             Director

                                       S