(Reuters) - FedEx Corp (>> FedEx Corporation) is expanding its retail business, FedEx Office, in the United States by adding 500 new locations within Walmart Inc (>> Wal-Mart Stores) stores in the next two years.

The move follows the completion of a pilot program spanning 47 locations within Walmart stores across six states, FedEx Office said on Tuesday.

Walmart-based FedEx Office offers packing, shipping and printing services. Customers can also direct their packages to be held at any of these locations for up to five business days using FedEx delivery service.

Deutsche Post DHL earlier this month said it was launching a delivery service for online retailers in eight U.S. cities, as the German logistics company takes a swipe at dominant players UPS (>> United Parcel Service) and FedEx.

FedEx shares were trading marginally up in light premarket trading on Tuesday.

(Reporting by Sanjana Shivdas and Vibhuti Sharma in Bengaluru; Editing by Arun Koyyur and Anil D'Silva)