Exhibit 5 [Letterhead of Cahill Gordon & Reindel] May 19, 1999 (212) 701-3000 The Great Atlantic & Pacific Tea Company, Inc. 2 Paragon Drive Montvale, New Jersey 07645 Ladies and Gentlemen: We have acted as counsel to The Great Atlantic & Pacific Tea Company, Inc., a Maryland corporation (the "Company"), in connection with the filing of a Registration Statement on Form S-8 (the "Registration Statement") under the Securities Act of 1933, as amended, relating to up to 5,000,000 shares of the Company's Common Stock, $1.00 par value (the "Common Stock") which may be issued pursuant to the Company's 1998 Long Term Incentive and Share Award Plan (the "Plan"). We advise you that in our opinion the shares of Common Stock covered by the Registration Statement, when issued in accordance with the Plan, will be legally issued, fully paid and nonassessable and no personal liability will attach to the ownership thereof. We hereby consent to the filing of this opinion with the Securities and Exchange Commission as an exhibit to said aforesaid Registration Statement. Very truly yours, /s/ CAHILL GORDON & REINDEL