Toyota is deepening its ties with Uber. The Japanese auto giant announced Monday it will invest $500 million in Uber, which follows an undisclosed investment made in 2016.

Toyota also said Monday it will integrate Uber's self-driving technology together with its own Toyota Guardian active safety system in purpose-built Sienna minivans to be added to Uber's ride-hailing fleet starting in 2021 on a trial basis.

Toyota Guardian, which is still in development, is designed to predict potential collisions and make corrections to avoid them, in essence adding another set of eyes to the self-driving car. It will help avoid cases like the instance in March where a pedestrian was struck and killed by an Uber self-driving car.

“Uber’s automated driving system and Toyota’s Guardian system will independently monitor the vehicle environment and real-time situation, enhancing overall vehicle safety for both the automated driver and the vehicle,” Toyota Research Institute CEO Gill Pratt said in a statement.

Toyota and Uber logos

Toyota and Uber logos

A location for the trial wasn't mentioned but will likely be in an area where Uber is already testing self-driving cars, such as in Pittsburgh, Pennsylvania. It also isn't clear whether Uber will continue to source vehicles from other automakers for its self-driving fleet. The firm currently sources Volvo XC90 for the fleet.

The deal is seen as a way for Toyota and Uber to collaborate and close the gap with leaders in the self-driving car space, such as Alphabet's Waymo and General Motors' GM Cruise. It also values Uber at some $72 billion, which bodes well for the company as it prepares for an initial public offering in 2019.

The long-term goal for Toyota and Uber is to develop a fully automated ride-hailing service at scale. The firms said Monday that they anticipate self-driving cars, once commercially viable, will be owned and operated by mutually agreed upon third party fleet operators.

 “Combining efforts with Uber, one of the predominant global ride-sharing and automated driving R&D companies, could further advance future mobility,” Toyota Connected Company President Shigeki Tomoyama said in a statement. “This agreement and investment marks an important milestone in our transformation to a mobility company as we help provide a path for safe and secure expansion of mobility services like ride-sharing that includes Toyota vehicles and technologies.”