(Reuters) - Retail giant Walmart Inc WMT.N said on Tuesday it entered into a strategic partnership with Microsoft Corp MSFT.O for wider use of cloud and artificial intelligence technology, in a sign of major rivals of Amazon.com Inc AMZN.O coming together.

The five-year agreement will leverage the full range of Microsoft’s cloud solutions, including Microsoft Azure and Microsoft 365, to make shopping faster and easier for customers, the Bentonville Arkansas-based company said.

As part of the partnership, Walmart and Microsoft engineers will collaborate to migrate a significant portion of walmart.com and samsclub.com to Azure, Walmart added.

While Walmart is doubling down on its e-commerce presence to better compete with Amazon, Microsoft has been working on a technology that would eliminate cashiers and checkout lines from stores, Reuters reported last month.

Microsoft’s technology aims to help retailers keep pace with Amazon Go, the ecommerce giant’s highly automated store format.

The Windows software maker has also shown the sample technology to retailers from around the world and has had talks with Walmart about a potential collaboration, Reuters reported.

Through the partnership, Walmart plans to defend itself from Amazon’s retail ambitions and expertise in data, and boost its online presence.