Japanese automakers Toyota Motor Corp. and Mazda Motor Corp. said Friday they plan to spend $1.6 billion US to set up a joint-venture auto manufacturing plant in the U.S., creating up to 4,000 jobs.

The plant will have an annual production capacity of about 300,000 vehicles and produce Toyota Corollas for the North American market. Mazda will make cross-over models that it plans to introduce to that market, both sides said.

The companies will split equally the cost for the plant, scheduled to open in 2021 at a location yet to be determined.

Toyota said it changed its plan to make Corollas at a plant in Guanajuato, Mexico, now under construction, and instead will produce Tacoma pickups there.

Corolla production had been bounced out of its Ontario plant, in favour of Mexico. Toyota has made more than three million Corollas in its Cambridge, Ont., plant, rated the best quality auto plant in North America by J.D. Power.

A Toyota spokesperson said the change would not affect timing of the end of production at the Cambridge plant, set for 2019.

The Corolla is one of North America's best-selling compacts and, with Mexican production on hold, Japanese plants may have to boost output of the car to meet demand until a new U.S. plant begins production in 2021, the spokesperson said. The Corolla is also made in Mississippi.

President Donald Trump had criticized Toyota for taking auto production and jobs to Mexico.

Kathryn McGarry, MPP for Cambridge, told CBC News she was satisfied that the change in plans on where to build the Corolla was a result of Toyota's new alliance with Mazda, rather than political pressure.

She pointed out that the Ontario government had given the automaker $41 million with $59 million in repayable investment from the federal government to retool the Cambridge and Woodstock plants and step up production of the RAV4.

McGarry said Ontario will be watching the auto sector carefully in upcoming NAFTA negotiations..

"The federal negotiating team around NAFTA, I expect Ontario will be well represented and we'll get a deal that's good for our country."

With the U.S. investment, both Mazda and Toyota can hope to prove their good American corporate citizenship and appease the Trump administration's concerns about jobs moving overseas.

The companies will also work together on various advanced auto technology, such as electric vehicles, safety features and connected cars, as well as products that they could supply each other, they said.

Toyota & Mazda to build a new $1.6B plant here in the U.S.A. and create 4K new American jobs. A great investment in American manufacturing! —@realDonaldTrump

Exchange of shares

Marvin Ryder, a professor at the DeGroote School of Business, says both companies are racing to develop new technology such as self-driving vehicles and electric cars against formidable competition such as Google, Uber and Tesla.

"What's happened with Mazda and Toyota -- they're so focused on the cars of today, they've forgotten about the cars of tomorrow," he told CBC News.

"It's not really about what they're going to build today or tomorrow and Donald Trump will take credit for it — it's about them playing catch-up on it," he added. "Now it's a question of can they do it in time."

Toyota will acquire 31,928,500 shares of common stock newly issued by Mazda through a third-party allotment, which will amount to a 5.05 per cent stake in Mazda, valued at about $455 million US.

Mazda, which makes the Miata roadster, will acquire $455 million worth of Toyota shares, the equivalent of a 0.25 per cent stake. The investment deal is expected to be final by October, the companies said.

Toyota president Akio Toyoda praised Mazda as a great partner.

"It has also sparked Toyota's competitive spirit, increasing our sense of not wanting to be bested by Mazda. This is a partnership in which those who are passionate about cars will work together to make ever-better cars," he said.

The companies said their collaboration will respect their mutual independence and equality. Toyota already provides hybrid technology to Mazda, which makes compact cars for Toyota at its Mexico plant.

The sheer cost of the plant also makes a partnership logical, as it boosts cost-efficiency and economies of scale. Working together on green and other auto technology also makes sense as the segment becomes increasingly competitive due to concerns about global warming, the environment and safety.

"Given the massive level of competition in the industry, partnerships are no longer a surprise," said Akshay Anand, an executive analyst at Kelley Blue Book.

Politics are another incentive.

"The new presidential administration has made it clear investments in the U.S. are a top priority, and this plant may be another nod to that mindset," Anand said.

Toyota posts solid 1st quarter earnings

Mazda president Masamichi Kogai said he hoped that the partnership will help energize the industry, by nurturing more car fans, as rivals come together for the shared goals of innovation and fostering talent and leadership.

Japanese rival Nissan Motor Co. is allied with Renault SA of France and Mitsubishi Motors Corp., and is the global leader in electric vehicles. Nissan-Renault became the top automaker in world vehicles sales for the first time in the first half of this year — underscoring how alliances can propel such groups into powerful leading positions.

Toyota is vying for the spot of No. 1 automaker in global vehicle sales against Nissan-Renault and Volkswagen AG of Germany, as the industry gradually consolidates.

The tie-up with Mazda, although still limited, marks the latest addition to Toyota's sprawling empire, which includes Japanese truck maker Hino Motors and minicar maker Daihatsu Motor Co. It is also the top shareholder in Fuji Heavy Industries, the maker of Subaru cars.

In the past, Toyota, which makes the Prius hybrid, Camry sedan and Lexus luxury models, was not overly bullish on electric vehicles, noting the limited cruise range of the technology. But recent breakthroughs in batteries allow for longer travel per charge.

Mazda, based in Hiroshima, Japan, used to have a powerful partner in Dearborn-based Ford Motor Co., which bought 25 per cent of Mazda in 1979, and raised it to 33.4 per cent in 1996. But Ford began cutting ties in 2008, and has shed its stake in Mazda.

Also Friday, Toyota reported its April-June profit was $5.6 billion, up 11 per cent over a year earlier. Quarterly sales rose seven per cent to $64 billion, as vehicle sales improved around the world, including in the U.S., Europe and Japan.

Toyota sold 2.2 million vehicles for the quarter, an improvement of 42,000 vehicles on-year, and stuck to its earlier projection for global vehicle sales for the fiscal year at 10.25 million vehicles.

Toyota also raised its fiscal full year profit forecast through March 2018 to $16 billion, higher than its earlier forecast of $14 billion.