Macy's Inc regained its investment grade debt rating on Wednesday from Standard & Poor's, which cited the retailer's robust performance, with results ahead of peers.

S&P raised the rating to 'BBB-' from 'BB+'.

High-grade debt buyers prefer an investment grade rating from at least two of the three major rating agencies, which also include Moody's and Fitch. Fitch already rates Macy's debt investment grade.

Macy's same-store sales in the first quarter rose 5.4 percent, outperforming rivals J.C. Penney Co Inc and Kohl's Corp . The retailer last week gave a full-year profit forecast above Wall Street's expectations.

During the quarter, Macy's paid down $335 million of debt at maturity as part of its efforts to regain investment grades from Moody's and S&P.

On a call with analysts last week, Chief Financial Officer Karen Hoguet said having an investment grade does save us some money in terms of financing costs.

In a statement on Wednesday, Macy's said the upgrade reflects the steps we have taken to improve the performance of our business and strengthen our balance sheet.

Macy's shares rose 1.1 percent in after-hours trading on top of a 2.8 percent gain during the regular session.

(Reporting by Phil Wahba; Editing by Richard Chang)