Contract

EXHIBIT 4 ================================================================================ BANC OF AMERICA MORTGAGE SECURITIES, INC., as Depositor, BANK OF AMERICA, N.A., as Servicer, and WELLS FARGO BANK, N.A., as Trustee AMENDMENT NO. 1 Dated March 25, 2005 to POOLING AND SERVICING AGREEMENT Dated May 27, 2004 ----------------------- Banc of America Alternative Loan Trust 2004-5 Mortgage Pass-Through Certificates Series 2004-5 ============================================================================== AMENDMENT NO. 1, dated March 25, 2005, (the "Amendment"), to the Pooling and Servicing Agreement dated May 27, 2004 (the "Agreement") among BANC OF AMERICA MORTGAGE SECURITIES, INC., as depositor (the "Depositor"), BANK OF AMERICA, N.A., as servicer (the "Servicer") and WELLS FARGO BANK, N.A., as trustee (the "Trustee"). WHEREAS, Section 11.01(i) of the Agreement provides, among other things, that the Depositor, the Servicer and the Trustee may amend the Agreement, subject to certain provisos, without the consent of the Holders of Certificates, for the purpose of curing any ambiguity or mistake to the provisions of the Agreement. WHEREAS, the Depositor, the Servicer and the Trustee desire to amend the Agreement, as set forth in this Amendment to correct a mistake. NOW THEREFORE, in consideration of the mutual agreements herein contained, the Depositor, the Master Servicer and the Trustee agree as follows: All terms used in this Amendment which are defined in the Agreement, either directly or by reference therein, have the meanings assigned to them therein, except to the extent such terms are defined or modified in this Amendment or the context clearly requires otherwise. Section 1. Amendment of Section 5. Section 5.02(b)(iv) is hereby deleted and replaced in its entirety with the following: On each Distribution Date prior to the Senior Credit Support Depletion Date for Group 4, the amount distributable to the Group 4 Senior Certificates pursuant to Section 5.02(a)(iii) for such Distribution Date, will be distributed sequentially, to the Class 4-A-1 and Class 4-A-2 Certificates, in that order, until their Class Certificate Balances have been reduced to zero. Section 2. Counterparts. This Amendment may be executed in any number of counterparts, each of which when so executed shall be deemed to be an original, but all of such counterparts shall together constitute but one and the same instrument. Section 3. Ratification of Agreement. Except as modified and expressly amended by this Amendment, the Agreement is in all respects ratified and confirmed, and all the terms, provisions and conditions thereof shall be and remain in full force and effect. Section 4. Governing Law. THIS AGREEMENT SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK, WITHOUT APPLICATION OF THE CONFLICTS OF LAWS PROVISIONS THEREOF, AND THE OBLIGATIONS, RIGHTS AND REMEDIES OF THE PARTIES HEREUNDER SHALL BE DETERMINED IN ACCORDANCE WITH SUCH LAWS. IN WITNESS WHEREOF, the Depositor, the Servicer and the Trustee have caused their names to be signed hereto by their respective officers thereunto duly authorized, all as of the day and year first above written. BANC OF AMERICA MORTGAGE SECURITIES, INC., as Depositor By: ----------------------------------------- Name: Judy Lowman Title: Vice President BANK OF AMERICA, N.A., as Servicer By: ----------------------------------------- Name: Richard G. Gibson Title: Senior Vice President WELLS FARGO BANK, N.A., as Trustee By: ----------------------------------------- Name: Christopher Regnier Title: Vice President STATE OF ) ) ss.: COUNTY OF ) ) On the 25th day of March, 2005, before me, a notary public in and for the State of _____________, personally appeared Christopher Regnier, known to me who, being by me duly sworn, did depose and say that he is a Vice President of Wells Fargo Bank, N.A., a national banking association, one of the parties that executed the foregoing instrument; and that he signed his name thereto by order of the Board of Directors of such association. --------------------------------------- Notary Public [Notarial Seal] My commission expires ____________. STATE OF ) ) ss.: COUNTY OF ) ) On the 25th day of March, 2005, before me, a notary public in and for the State of _________________, personally appeared Judy Lowman, known to me who, being by me duly sworn, did depose and say that she is the Vice President of Banc of America Mortgage Securities, Inc. a Delaware corporation, one of the parties that executed the foregoing instrument; and that she signed her name thereto by order of the Board of Directors of such corporation. --------------------------------------- Notary Public [Notarial Seal] My commission expires ____________. STATE OF NORTH CAROLINA ) ) ss.: COUNTY OF MECKLENBURG ) ) On the 25th day of March, 2005, before me, a notary public in and for the State of North Carolina, personally appeared Richard G. Gibson, known to me who, being by me duly sworn, did depose and say that he is the Senior Vice President of Bank of America, N.A., a national banking association, one of the parties that executed the foregoing instrument; and that he signed her name thereto by order of the Board of Directors of such association. --------------------------------------- Notary Public [Notarial Seal] My commission expires ____________.