TOKYO (AP) -- Mazda Motor (NasdaqOTH: MZDAF) will make Toyota-brand subcompacts at its new plant in Mexico, allowing Japan's top automaker to strengthen its North American model lineup.

Under the agreement announced Friday, Mazda will annually produce 50,000 subcompacts, based on the Mazda2 but under the Toyota brand, by mid-2015. Toyota Motor (NYSE:TM) will invest in equipment and other costs for the production increase, both sides said.

The plant employing 3,000 people was set to have annual production capacity of 140,000 vehicles.

Mazda has been struggling since its ties with U.S. automaker Ford (NYSE:F) weakened. Speculation has been rife the Hiroshima-based maker will need a new partner to ride out intense competition in the industry.

Toyota has seen its profitability recover recently. Last year, the disaster in northeastern Japan slammed production.

The Motley Fool owns shares of Ford. Motley Fool newsletter services recommend Ford. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.