Walmart is getting bruised in its battle with online leader Amazon.

The world's largest retailer on Tuesday reported a smaller-than-expected fourth-quarter profit as it wrestled with slower e-commerce sales during the busiest time of the year. The results underscore the company's challenges in a fiercely competitive retail landscape.

Those numbers overshadowed the discounter's better-than-expected sales at its established stores and higher customer traffic as online services linked to its stores attract more shoppers.