Exhibit 10.5


    
      
        

      

    

     Exhibit
      10.5

    

      
        FIRST
          AMENDMENT TO

        SECOND
          AMENDED AND RESTATED INTERCREDITOR 

        AND
          SUBORDINATION AGREEMENT

         

        THIS
          FIRST AMENDMENT TO SECOND AMENDED AND RESTATED INTERCREDITOR AND SUBORDINATION
          AGREEMENT (herein called this “Amendment”)
          is
          made as of the 29th day of June, 2005, by and among THE ROYAL BANK OF SCOTLAND
          plc, as agent (in such capacity, and together with any successor in such
          capacity, the “Subordinated
          Agent”)
          for
          each of the lenders that is signatory to, or which becomes a signatory
          to, the
          Subordinated Credit Agreement (collectively, the “Subordinated
          Lenders”),
          and
          BANK OF AMERICA, N.A., as agent (in such capacity as agent, and together
          with
          any successor in such capacity, the “Senior
          Agent”)
          for
          each of the lenders that is signatory to, or which becomes a signatory
          to the
          Senior Credit Agreement (collectively, the “Senior
          Lenders”).

        


        BRIGHAM
          EXPLORATION COMPANY, a Delaware corporation (the “Parent”), BRIGHAM OIL &
          GAS, L.P., a Delaware limited partnership (“BOG”), and BRIGHAM, INC., a Nevada
          corporation (“BI”) are signatories hereto solely for the purpose of evidencing
          their acknowledgment and consent to the terms and conditions of this Amendment.
          

        


        W
          I T N E S S E T H:

        


        WHEREAS,
          the Senior Agent, the Subordinated Agent, the Parent, BOG and BI are parties
          to
          the Second Amended and Restated Intercreditor and Subordination Agreement
          dated
          as of January 21, 2005 (the “Original
          Agreement”),
          for
          the purposes and consideration therein expressed; 

        


        WHEREAS,
          the Senior Agent and the Subordinated Agent desire to amend the Original
          Agreement for the purposes described 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 Senior Lenders and the Subordinated
          Lenders to BOG, 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.    Defined
          Terms.
          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. As used herein, the following terms shall have
          the
          following meanings: 

        


        “Intercreditor
          Agreement”
          means
          the Original Agreement as amended by this Amendment. 

         

      

      
        
          
          

        

        
          1

          
            

          

        

        
          
          

        

      

       

      
        ARTICLE
          II.
AMENDMENTS
          


         

        Section
          2.1.  Introductory
          Paragraph and Recitals.

        


        (a) 
Any
          references to “Senior
          Agent”
          contained in the Original Agreement shall be amended to refer to Bank of
          America, N.A., as agent (in such capacity as agent, and together with any
          successor in such capacity.

        


        (b) 
Recital
          A
          of the Original Agreement is hereby amended in its entirety as
          follows:

         

        A. 
BOG,
          as
          the borrower, the Senior Lenders and the Senior Agent are parties to that
          certain Fourth Amended and Restated Credit Agreement dated as of June 29,
          2005
          (such agreement, as the same may be from time to time amended, modified,
          supplemented, restated, refinanced or replaced, the “Senior
          Credit Agreement”),
          pursuant to which the Senior Lenders have made certain credit available
          to and
          on behalf of BOG.

         

        (c) 
Recital
          E
          of the Original Agreement is hereby amended in its entirety as
          follows:

         

        E. 
BOG
          has
          entered into that certain Second Amended and Restated Subordinated Credit
          Agreement dated as of January 21, 2005 with the Subordinated Agent and
          the
          Subordinated Lenders, as amended by the First Amendment to Second Amended
          and
          Restated Subordinated Credit Agreement dated as of June 29, 2005 (such
          agreement, as amended and as the same may be from time to time further
          amended,
          modified, supplemented, restated, refinanced or replaced as permitted herein,
          the “Subordinated
          Credit Agreement”)
          pursuant to which the Subordinated Lenders will make loans to BOG, such
          advances
          to be evidenced by a promissory note executed and delivered by BOG in accordance
          with the Subordinated Credit Agreement (such promissory note, as the same
          may be
          from time to time amended, modified, supplemented, restated, refinanced
          or
          replaced as permitted herein, the “Subordinated
          Note”).

         

        Section
          2.2.  Section
          3.3(c)
          of the
          Original Agreement is hereby amended by replacing “$20,000,000” with
“$40,000,000”.

        


        Section
          2.3.  Section
          4.3
          of the
          Original Agreement is hereby amended by replacing the notice information
          set
          forth therein with the following:

        


        Bank
          of
          America, N.A.

      

       

      
        
          
          

        

        
          2

          
            

          

        

        
          
          

        

      

      
         

        ARTICLE
          III.

         

        CONSENT

         

        Section
          3.1.    Consent
          and Waiver.
          The
          Senior Agent hereby consents to the execution and delivery of the First
          Amendment to Second Amended and Restated Subordinated Credit Agreement
          dated as
          of June 29, 2005 among BOG, Subordinated Agent and the Subordinated Lenders
          (the
“First
          Amendment”)
          and to
          the transactions described therein and waives any and all defaults arising
          or
          which may have heretofore arisen under Section 3.3 of the Original Agreement
          as
          a result of the First Amendment or such transactions. The consents and
          waivers
          contained herein are limited to the extent described herein and shall not
          be
          construed to be a consent to or a waiver of any other actions prohibited
          by the
          Intercreditor Agreement or the Senior Loan Documents. The Senior Agent
          reserves
          the right to exercise any rights and remedies available to it in connection
          with
          any future defaults with respect to Section 3.3 of the Intercreditor Agreement
          and any other provision of any other Senior Loan Document. 

         

        ARTICLE
          IV.

         

        MISCELLANEOUS

         

        Section
          4.1.   Ratification
          of Agreements.
          The
          Original Agreement as hereby amended is hereby ratified and confirmed in
          all
          respects. Without in any way modifying or limiting the foregoing, each
          of the
          undersigned Credit Parties hereby (a) consents to the provisions
          of this
          Amendment and the transactions contemplated herein, and (b) ratifies
          and
          confirms its obligations made by it in favor of Senior Agent for the benefit
          of
          each Senior Lender and the Subordinated Agent for the benefit of each
          Subordinated Lender pursuant to and in accordance with Article II of the
          Intercreditor Agreement, and agrees that its obligations and covenants
          thereunder are unimpaired hereby and shall remain in full force and effect.
          Any
          reference to the Intercreditor Agreement in any Senior Loan Document or
          Subordinated Loan Document shall be deemed to be a reference to the Original
          Agreement as hereby amended. 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 the Senior Lenders or the Subordinated Lender
          under the Intercreditor Agreement or any other Senior Loan Document or
          Subordinated Loan Document, as the case may be, nor constitute a waiver
          of any
          provision of the Intercreditor Agreement or any Senior Loan Document or
          Subordinated Loan Document. 

         

        Section
          4.2.     GOVERNING
          LAW.
          THIS
          AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED AND ENFORCED IN ACCORDANCE
          WITH,
          THE LAWS OF THE STATE OF NEW YORK. 

         

        Section
          4.3.  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. 

         

        
          
            
            

          

          
            3

            
              

            

          

          
            
            

          

        

         

        THIS
          AMENDMENT 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 AMONG
          THE
          PARTIES HERETO.

         

        [Signatures
          on Following Page]

         

        

          
            
              
              

            

            
              4

              
                

              

            

            
              
              

            

          

        

      

       

      IN
        WITNESS WHEREOF, this Amendment is executed as of the date first above written.
        

      

        
          	 	 	 	
                  SENIOR
                    AGENT:

                	 
	 	 	 	 	 
	 	 	 	
                  BANK
                    OF AMERICA, N.A.,

                	 
	 	 	 	
                  as
                    the Senior Agent

                	 
	 	 	 	 	 
	 	 	 	
                  /s/
                    Matthew C. Correia

                	 
	 	 	 	
                  Assistant
                    Vice President

                	 
	 	 	 	 	 
	 	 	 	 	 
	 	 	 	
                  SUBORDINATED
                    AGENT:

                	 
	 	 	 	 	 
	 	 	 	
                  THE
                    ROYAL BANK OF SCOTLAND plc,

                	 
	 	 	 	
                  as
                    the Subordinated Agent

                	 
	 	 	 	 	 
	 	 	 	
                  /s/
                    Phillip R. Ballard

                	 
	 	 	 	
                  Senior
                    Vice President

                	 
	 	 	 	 	 
	BRIGHAM
                  EXPLORATION COMPANY,	 	 	 
	a
                  Delaware corporation	 	 	 
	 	 	 	 	 
	/s/
                  Eugene B. Shepherd,
                  Jr.	 	 	 
	Executive
                  Vice President and Chief Financial Officer	 	 	 
	 	 	 	 	 
	BRIGHAM
                  OIL & GAS, L.P.,	 	 	 
	a
                  Delaware limited partnership	 	 	 
	 	 	 	 	 
	
                  By:     
                    Brigham,
                    Inc., its General Partner

                	 	 	 
	 	 	 	 	 
	/s/
                  Eugene B. Shepherd, Jr.	 	 	 
	Executive
                  Vice President and Chief Financial Officer	 	 	 
	 	 	 	 	 
	BRIGHAM,
                  INC.,	 	 	 
	a
                  Nevada corporation	 	 	 
	 	 	 	 	 
	/s/
                  Eugene B. Shepherd, Jr.	 	 	 
	Executive
                  Vice President and Chief Financial Officer 	 	 	 


        

         

        5