Microsoft and Walmart are teaming up for a strategic partnership that will take on rival Amazon in both technology and retail. Walmart is announcing today, at Microsoft’s Inspire partner conference, that it’s partnering with Microsoft to use the company’s cloud services. The five-year agreement will see Walmart use Azure and Microsoft 365 across the company, alongside new projects focused on machine learning, artificial intelligence, and data platforms.

Walmart is Amazon’s biggest retail competitor, and Microsoft is Amazon’s largest cloud services rival. That rivalry isn’t lost on Microsoft CEO Satya Nadella, who hinted in an interview with The Wall Street Journal that it’s “absolutely core to this” new partnership. “How do we get more leverage as two organizations that have depth and breadth and investment to be able to outrun our respective competition,” says Nadella.

While the tech partnership will obviously benefit both companies, it also comes just weeks after reports suggested Microsoft is working on rival Amazon Go technology for cashier-free stores. Microsoft is reportedly in talks with Walmart for this technology, and the software maker has hired a computer vision specialist from Amazon. Amazon’s Go store in Seattle uses multiple camera and sensors that use computer vision algorithms to detect what items you’re taking out of the store so you’re automatically charged. Microsoft is reportedly experimenting with attaching cameras to shopping carts to track items.

Both Walmart and Microsoft don’t reference too many of the future-facing parts of this strategic deal, and it’s mostly timed for Microsoft’s big partner conference in Las Vegas this week. However, this new deal could be a unique test ground for Microsoft’s bigger AI ambitions and any future plans it has to push other retailers to use its range of cloud services.