Uber said it would take a majority stake in Cornershop, a grocery delivery company with operations in Latin America and Canada

Uber said Friday it agreed to take a majority stake in Cornershop, an online grocery provider in Chile, Mexico, and which recently expanded to Peru and Canada.

The deal, terms of which were not disclosed, comes with Uber seeking to expand further beyond ridesharing and become a diversified logistics and transport operation.

"Whether it's getting a ride, ordering food from your favorite restaurant, or soon, getting groceries delivered, we want Uber to be the operating system for your ," said Uber chief executive Dara Khosrowshahi.

"We're excited to partner with the team at Cornershop to scale their vision, and look forward to working with them to bring to millions of consumers on the Uber platform."

The San Francisco-based ridesharing giant already has a restaurant delivery service called Uber Eats and has moved into and scooters, trucking, with a long-term project on flying taxis.

Oskar Hjertonsson, founder and CEO of Cornershop, said the partnership will help the group expand beyond Latin America.

"Uber is the perfect partner as we embark on our quest to bring our unique flavor of on-demand groceries from incredible retail partners to many more countries around the world," he said.

The companies said Cornershop will continue to operate under its current leadership, with the investment expected to close in early 2020.

Earlier this year, Mexican authorities blocked US retail giant Walmart from acquiring Cornershop.