Exhibit 10.39 FIRST AMENDMENT TO LETTER OF CREDIT AGREEMENT This First Amendment to Letter of Credit Agreement (the "First Amendment") is made as of the 13 day of October, 2006 by and among THE GREAT ATLANTIC & PACIFIC TEA COMPANY, INC., a Maryland corporation (the "Company"); and BANK OF AMERICA, N.A., as Issuing Bank (the "Issuing Bank"). In consideration of the mutual covenants herein contained and benefits to be derived herefrom, the parties hereto agree as follows: WITNESSETH WHEREAS, the Company and the Issuing Bank are parties to a Letter of Credit Agreement dated as of October 14, 2005 (the "Letter of Credit Agreement"); and WHEREAS, the Company has advised the Issuing Bank that the Company desires to amend the Letter of Credit Agreement as provided herein. NOW THEREFORE, it is hereby agreed as follows: 1. Definitions: All capitalized terms used herein and not otherwise defined shall have the same meaning herein as in the Letter of Credit Agreement. 2. Amendment of the Letter of Credit Agreement. The Letter of Credit Agreement is hereby amended as follows: a. Clause (i) of the definition of "Termination Date" in Section 1.01 of the Letter of Credit Agreement is hereby amended by deleting the reference to "October 14, 2006" therein and substituting in its stead "October 14, 2007". b. Clause (ii) of Section 2.01(b) of the Letter of Credit Agreement is hereby amended by deleting the reference to "October 14, 2006" therein and substituting in its stead "October 14, 2007". 3. Conditions to Effectiveness. This First Amendment shall not be effective until each of the following conditions precedent have been fulfilled to the satisfaction of the Issuing Bank: a. This First Amendment shall have been duly executed and delivered by the Company and the Issuing Bank. b. All action on the part of the Company necessary for the valid execution, delivery and performance by the Company of this First Amendment shall have been duly and effectively taken. c. No Default or Event of Default shall have occurred and be continuing. d. The Company shall have provided such additional instruments and documents as the Issuing Bank and their counsel may have reasonably requested. 4. Miscellaneous. a. Except as provided herein, all terms and conditions of the Letter of Credit Agreement remain in full force and effect. The Company hereby ratifies, confirms, and reaffirms all of the representations, warranties and covenants therein contained. b. This First Amendment may be executed in several counterparts and by each party on a separate counterpart, each of which when so executed and delivered, each shall be an original, and all of which together shall constitute one instrument. Delivery of an executed counterpart of a signature page hereto by telecopy shall be effective as delivery of a manually executed counterpart hereof. c. The Company shall reimburse the Issuing Bank for all expenses incurred in connection with this First Amendment, including, without limitation, reasonable attorneys' fees, costs and expenses. d. This First Amendment expresses the entire understanding of the parties with respect to the matters set forth herein and supersedes all prior discussions or negotiations hereon. Any determination that any provision of this First Amendment or any application hereof is invalid, illegal or unenforceable in any respect and in any instance shall not effect the validity, legality, or enforceability of such provision in any other instance, or the validity, legality or enforceability of any other provisions of this First Amendment. IN WITNESS WHEREOF, the parties hereto have caused this First Amendment to be executed as the date first above written. [SIGNATURE PAGES FOLLOW] BANK OF AMERICA, N.A., as Issuing Bank By: /s/ Alexis MacElhiney ------------------------------------ Name: Alexis MacElhiney Title: Director THE GREAT ATLANTIC & PACIFIC TEA COMPANY, INC. By: /s/ William J. Moss ------------------------------------ Name: William J. Moss Title: Vice President and Treasurer