Toyota has agreed to purchase a five percent stake in Mazda, and will build a joint plant in the U.S. worth $1.6 billion, the automaker revealed today. Toyota also said it’s going to increase its investment in “crucial fields” related to the future of automotive technology, including self-driving, artificial intelligence and green vehicle tech.

The automaker’s greater emphasis on tech investment and R&D is a direct result of pressure from new entrants into transportation including Google, Apple and Amazon, Toyota President Akio Toyoda told press at a conference in Tokyo on Friday, according to Bloomberg.

Last month, Toyota claimed to be nearing a breakthrough in solid state battery tech that could extend the life and charge capacity of electric vehicles, and it’s also been looking to build out its expertise and product strength in ADAS and connectivity. At CES this year, Toyota also demonstrated a concept vehicle that entered around an onboard artificial intelligence smart assistant that helps the driver inside and out of the vehicle.

Toyota’s R&D spending in those “crucial” areas including AI and green energy cars is raising from 20 to 25 percent, and the joint plant will aim to be online by 2021, with a production capacity of 300,000 per year.