Exhibit 4 ------------------------------------------------------------------------------ BANK OF AMERICA MORTGAGE SECURITIES, INC., as Depositor BANK OF AMERICA, N.A., as Servicer and THE BANK OF NEW YORK, as Trustee AMENDMENT No. 1 Dated January 30, 2004 To The POOLING AND SERVICING AGREEMENT Dated October 24, 2002 ------------------------------------------------------------------------------ Mortgage Pass-Through Certificates Series 2002-10 AMENDMENT No. 1, dated January 30, 2004, (the "Amendment"), to the Pooling and Servicing Agreement dated October 24, 2002 (the "Agreement") among BANK OF AMERICA MORTGAGE SECURITIES, INC., as depositor (the "Depositor"), BANK OF AMERICA, N.A., as servicer (the "Servicer") and THE BANK OF NEW YORK, as trustee (the "Trustee"). WHEREAS, Section 11.01 of the Agreement provides, among other things, that the Depositor, the Servicer and the Trustee may amend the Agreement, without the consent of any of the Certificateholders, to make any other provisions with respect to matters or questions arising under the Agreement which shall not be materially inconsistent with the provisions of this Agreement, provided that such action shall not, as evidenced by an Opinion of Counsel, adversely affect in any material respect the interests of any Certificateholder. WHEREAS, Section 11.01 of the Agreement also provides, among other things, that the Depositor, the Servicer and the Trustee may amend the Agreement, subject to certain provisos, with the consent of the Holders of Certificates evidencing Percentage Interests aggregating not less than 66-2/3% of each Class of Certificates affected thereby for the purpose of adding any provisions to or changing in any manner or eliminating any of the provisions of the Agreement or modifying in any manner the rights of the Holders of Certificates of such Class. WHEREAS, the Depositor, the Servicer and the Trustee desire to amend the Agreement, as set forth in this Amendment, and have obtained the consent of the Holder of 100% Percentage Interest of the Class SES Certificates and the Opinions of Counsel required by Section 11.01 of the Agreement, including the Opinion of Counsel referred to in the first WHEREAS clause herein relating to the effect of such amendments on the other Certificateholders. NOW THEREFORE, in consideration of the mutual agreements herein contained, the Depositor, the 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 1.01. The definition of "Class SES Compensating Interest" is hereby replaced in its entirety with the following: Class SES Compensating Interest: With respect to each Distribution Date and Loan Group, the least of (a) the amount distributable pursuant to Section 5.02(a)(i) on the Class SES Component of the Related Group (before any reduction in respect of Class SES Compensating Interest), (b) the Prepayment Interest Shortfall for such Distribution Date and Loan Group less the Servicer Compensating Interest for such Distribution Date and Loan Group and (c) one-twelfth of 0.25% of the Pool Stated Principal Balance of such Loan Group less the Servicer Compensating Interest for such Distribution Date and Loan Group. -2- Section 2. Amendment of Section 1.01. The definition of "Class SES Component Distributable Amount" is hereby deleted in its entirety. Section 3. Amendment of Section 1.01. The definition of "Servicer Compensating Interest" is hereby replaced in its entirety with the following: Servicer Compensating Interest: With respect to each Distribution Date and each Loan Group, the least of (a) the aggregate Servicing Fee for such Distribution Date relating to such Loan Group (before giving effect to any reduction pursuant to Section 3.17), (b) the Prepayment Interest Shortfall for such Distribution Date and such Loan Group and (c) one-twelfth of 0.25% of the Pool Stated Principal Balance of such Loan Group. Section 4. Amendment of Section 3.11(a)(viii). Section 3.11(a)(viii) is hereby replaced in its entirety with the following: (viii) on or prior to the Remittance Date, to withdraw an amount equal to the related Pool Distribution Amount (less, at the Servicer's option, but only for so long as Bank of America is the Servicer and Bank of America or an affiliate is the sole Holder of the Class SES Certificates, an amount up to 1/12th of 0.200% per annum of the Stated Principal Balance of the Mortgage Loans in the related Loan Group on the Due Date in the month preceding the month of such Distribution Date, which amount shall be withdrawn on the related Distribution Date and remitted to the Holders of the Class SES Certificates on behalf of the Trustee in respect of the Component Interest Distribution Amounts of the Class SES Components), any Ancillary Income (provided, however, if Bank of America is the Servicer and Bank of America or an affiliate is the sole Holder of the Class SES Certificates, such Ancillary Income, at the Servicer's option, need not be remitted to the Trustee but shall be withdrawn on the related Distribution Date and remitted to the Holders of the Class SES Certificates on behalf of the Trustee), the related Trustee Fee and any other amounts due to the Trustee under this Agreement for such Distribution Date, to the extent on deposit, and remit such amount in immediately available funds to the Trustee for deposit in the applicable Certificate Account; and Section 5. Amendment of Section 3.17. Section 3.17 is hereby replaced in its entirety with the following: Section 3.17 Servicing Compensation. The Servicer shall be entitled out of each payment of interest on a Mortgage Loan (or portion thereof) and included in the Trust Estate to retain or withdraw from the Servicer Custodial Account an amount equal to the Servicing Fee for such Distribution Date; provided, however, that the aggregate Servicing Fee for the Servicer relating to the Mortgage Loans in a Loan Group for such Distribution Date shall be reduced (but not below zero) by an amount equal to the Servicer Compensating Interest for such Loan Group for such Distribution Date. Any successor Servicer shall also be entitled to the Supplemental Servicing Fee. Any additional Servicing Compensation shall be retained by the Servicer to the extent not required to be deposited in the Servicer Custodial Account pursuant to Section 3.08(b). The Servicer shall be required to pay all expenses incurred by it in connection with its servicing activities hereunder and shall not be entitled to reimbursement therefor except as specifically provided in this Agreement. -3- Section 6. Amendment of Section 5.04(a)(xvi). Section 5.04(a)(xvi) is hereby replaced in its entirety with the following: (xvi) the Ancillary Income for each Class SES Component for such Distribution Date; and Section 7. 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 8. 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 9. Governing Law. This Amendment shall be construed in accordance with the laws of the State of New York (without regard to conflicts of laws principles), and the obligations, rights and remedies of the parties hereunder shall be determined in accordance with such laws. -4- IN 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. BANK OF AMERICA MORTGAGE SECURITIES, INC., as Depositor By: /s/ Judy Lowman -------------------------------- Name: Judy Lowman Title: Vice President BANK OF AMERICA, N.A., as Servicer By: /s/ Stephen A. Cummings -------------------------------- Name: Stephen A. Cummings Title: Senior Vice President THE BANK OF NEW YORK, as Trustee By: /s/ Diane Pickett -------------------------------- Name: Diane Pickett Title: Vice President -5- STATE OF GEORGIA ) ) ss.: COUNTY OF FORSYTH ) On this 30th day of January, 2004, before me, a notary public in and for the State of Georgia, personally appeared Judy Lowman, known to me who, being by me duly sworn, did depose and say that she is a Vice President of Bank 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 said corporation. ------------------------- Notary Public [NOTARIAL SEAL] My commission expires ____________. STATE OF NORTH CAROLINA ) ) ss.: COUNTY OF MECKLENBURG ) ) On the 30th day of January, 2004, before me, a notary public in and for the State of North Carolina, personally appeared Stephen A. Cummings, 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 his name thereto by order of the Board of Directors of such association. ----------------------------- Notary Public [NOTARIAL SEAL] My commission expires ____________. STATE OF NEW YORK ) ) ss.: COUNTY OF NEW YORK ) On this 30th day of January, 2004, before me, a notary public in and for the State of New York, personally appeared Diane Pickett, known to me who, being by me duly sworn, did depose and say that she is a Vice President of The Bank of New York, a New York banking 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 said corporation. ------------------------- Notary Public [NOTARIAL SEAL] My commission expires ____________.