Mazda will build a Toyota sub-compact vehicle based on its own Mazda2 platform at the Mexican plant it is currently building in Salamanca, in the central state of Guanajuato, due for completion in 2014.

It is the first time that Mazda has built a vehicle for its rival. Mazda said the deal had been reached because of the benefits it brought to both companies.

“Through the agreement, Mazda aims to increase production efficiency and contribute to its profitability,” said a spokesperson for the carmaker, though she refrained from divulging how much each carmaker would be investing in equipment, development and production costs. It was also too early to discuss potential synergies in purchasing, parts supply and shipping arrangements said the spokesperson.

Toyota said that through the production of the model at Salamanca it aims to strengthen its North American vehicle lineup. The company produced its 25 millionth vehicle in North America at the end of October in the shape of a hybrid Avalon at the Georgetown plant in Kentucky but models such as the Scion are still imported from Japan, which is costly given the ongoing strength of the yen.

Toyota has already said that it aims "to create a production structure that makes most sense from a global point of view", and the strength of the yen is thought to be a strong influence on this decision, which is making exports from Japan less cost-competitive and affecting profits.

It follows similar moves made by other Japanese carmakers, including Honda, to move production away from Japan in an effort to limit the effect of the strong yen on exports.

In a joint statement regarding production at Salamanca, the carmakers said that production of the Toyota model would start around the summer of 2015 at a pace of 50,000 units per year and will be sold through Toyota dealerships. Mazda2 and Mazda3 production at the plant is expected to start earlier, in March 2014, with an original capacity target of 140,000.

Toyota said it would be investing “an appropriate portion of production equipment costs and development costs related to the Toyota vehicle and also an appropriate portion of costs related to the plant’s production-capacity increase”.

Though it is the first time that the Mazda has built a car for Toyota, the two companies have previously worked together. In March 2010, Toyota licensed its hybrid system technology to Mazda and they are cooperating on the G-Book telematics service in Japan.