Toyota just placed a big bet on autonomous vehicles.

The automaker announced on Monday that it is investing $500 million in Uber and working more closely with the company to accelerate the development and deployment of self-driving vehicles. Uber plans to retrofit Toyota Sienna minivans with its autonomous technology and begin real-world testing in 2021.

The deal gives Toyota a key partner in a field that is growing rapidly, and comes on the same day that four of the automaker's suppliers announced a partnership to develop some of the software underpinning autonomous vehicles.

"This agreement and investment marks an important milestone in our transformation to a mobility company," Shigeki Tomoyama, the president of Toyota Connected Company, said in a statement.

Automakers and tech companies continue scrambling to position themselves for a future in which car ownership gives way to mobility as a service. That's led to a growing number of partnerships as companies like Toyota realize they don't know much about ridesharing and companies like Uber discover that building cars is hard.

Other tech and auto companies have forged similar arrangements. Waymo, for example, buys vehicles from Chrysler and Jaguar Land Rover.

"We're seeing marriages of companies of complementary abilities," said Brian Collie of Boston Consulting Group. "Partnerships are quite necessary and create value toward bringing mobility as a service to the market faster."

Uber leads the world in ridesharing, which gives it an edge in finding an audience for autonomous vehicles. Uber could create a ready market for Toyota self-driving cars through its app, which is used by millions of people.

Monday's announcement builds on an existing partnership. During the International Consumer Electronics Show in January, the two companies announced e-Palette, an autonomous vehicle concept that could be used for everything from pizza delivery to ridesharing.

Toyota's latest infusion of cash provides Uber with an unreserved endorsement of a self-driving car program rocked by a lawsuit from Google and the death of a pedestrian in Arizona in March. Uber shuttered its research and development efforts in Arizona in May, and only recently returned to the streets of Pittsburgh, Pennsylvania. It still has not started testing its cars again in autonomous mode.

Related: How free self-driving car rides could change everything

This isn't Toyota's first move into the space. In 2015, it said it would invest $1 billion in the Toyota Research Institute artificial intelligence lab. Institute CEO Gill Pratt said in a statement Monday that the Uber partnership would accelerate efforts to deliver autonomous technology.

Toyota's financial investment will also prove useful given the high costs of running a self-driving car program. Engineers who specialize in the technology are rare and command salaries of several hundred thousand dollars a year. Maintaining a large fleet of test vehicles brings additional costs.

In May, SoftBank invested $2.25 billion in Cruise, the self-driving startup of General Motors. That just goes to show that even the biggest companies need partners.