SECOND AMENDMENT TO CREDIT AGREEMENT This Second Amendment to Credit Agreement (this “Amendment”) is dated as of September 10, 2004, by and among ATLAS AMERICA, INC., a Delaware corporation (the“Borrower”); AIC, INC., a Delaware corporation (“AIC”); ATLAS ENERGY CORPORATION, an Ohio corporation (“AEC”); ATLAS AMERICA, INC., a Pennsylvania corporation (“Atlas PA”); ATLAS ENERGY GROUP, INC., an Ohio corporation (“Atlas Energy”); ATLAS ENERGY HOLDINGS, INC., a Delaware corporation (“Atlas Holdings”); ATLAS NOBLE CORP., a Delaware corporation (“Atlas Noble”); ATLAS PIPELINE PARTNERS GP, LLC, a Delaware limited liability company (“Atlas Pipeline”), ATLAS RESOURCES, INC., a Pennsylvania corporation (“Atlas Resources”); REI-NY, INC., a Delaware corporation (“REI”); RESOURCE AMERICA, INC., a Delaware corporation (“Parent”); RESOURCE ENERGY, INC., a Delaware corporation (“Resource Energy”); and VIKING RESOURCES CORPORATION, a Pennsylvania corporation (“Viking”); (AIC, AEC, Atlas Energy, Atlas Holdings, Atlas Noble, Atlas Pipeline, Atlas PA, Atlas Resources, Parent, REI, Resource Energy, and Viking collectively, the“Guarantors,” the Borrower and the Guarantors herein collectively, the“Obligors”); each of the lenders that is a signatory hereto (individually, together with its successors and assigns, a “Lender” and collectively, the“Lenders”); WACHOVIA BANK, NATIONAL ASSOCIATION, as administrative agent for the Lenders (in such capacity, together with its successors in such capacity, the“Administrative Agent”), and WACHOVIA BANK, NATIONAL ASSOCIATION, as issuing bank (in such capacity, together with its successors in such capacity, the“Issuing Bank”). R E C I T A L S A. The parties hereto are parties to that certain Credit Agreement dated as of March 12, 2004, as amended by that certain First Amendment to Credit Agreement dated as of July 10, 2004 (as renewed, extended, amended, or restated from time to time, the“Credit Agreement”). B. Borrower has requested that Administrative Agent, Issuing Bank and Lenders amend the Credit Agreement as provided herein, subject to the terms and conditions hereof. NOW, THEREFORE, in consideration of the foregoing, and intending to be legally bound, the parties agree as follows: SECTION 1. Terms Defined in Agreement. As used in this Amendment, except as may otherwise be provided herein, all capitalized terms which are defined in the Credit Agreement shall have the same meaning herein as therein, all of such terms and their definitions being incorporated herein by reference. Unless otherwise indicated herein, all capitalized and undefined terms used herein shall have the same meanings as set forth in the Credit Agreement. SECTION 2. Amendments to Credit Agreement. Subject to the condition precedent set forth in Section 3 hereof, the Credit Agreement is hereby amended as follows: |