The US carmaker will transfer most of its Indian business to a new joint venture controlled and managed by local rival Mahindra, it announced on Tuesday. Mahindra will own 51% of the joint venture and Ford the rest.

The joint venture should be operational by the middle of 2020. It will "develop, market and distribute" Ford vehicles in India and also sell Ford and Mahindra vehicles overseas, the company said. Ford will retain control of an engine manufacturing unit in India.

"Partnerships have the ability to make us more competitive and better serve customers in an era of rapid change, and this partnership is no different," Ford's executive chairman Bill Ford told reporters. "We remain deeply committed to India and our 14,000 employees, dealers and suppliers," he added.

The companies have been working together in India since 2017, when they formed a strategic alliance to focus on technologies like smart and electric vehicles.

Mahindra was the first major Indian carmaker to start selling electric vehicles directly to consumers, and the new joint venture with Ford will work on developing battery-powered cars. It will also make three new SUVs under the Ford brand in the coming years.

Ford first began operations in India in 1995 and has invested more than $2 billion in the country over the last 25 years. The company has two plants in the western state of Gujarat and the southern state of Tamil Nadu, which produce cars for India as well as other markets.

It became the first American carmaker to import vehicles from India, announcing in 2016 that it would start shipping its EcoSport compact SUVs from its Tamil Nadu plant to the United States.

But the company trails its rivals in the country, accounting for less than 3% of passenger vehicle sales last month, according to data from the Society of Indian Automobile Manufacturers. Mahindra currently has around 7% of the market.

Maruti Suzuki, the country's biggest carmaker, made 47% of the cars sold in India in August.

Ford's reconfiguration in India is more evidence of the immense pressure on the country's auto industry, which has been struggling as consumers hold off on big purchases because of a credit crunch and a slowing economy. Car sales in India plunged 41% in August compared to the same month last year, marking the biggest monthly drop in two decades and a tenth straight month of declines.

India had been a bright spot in the global car industry, with annual sales of passenger vehicles rising 33% in the last five years. Before this year's slump hit, it was predicted to overtake Germany and Japan to become the world's third largest car market by 2020.

Ford is the second US carmaker to cut back its India business in recent years. General Motors (GM) announced in 2017 that it would stop selling cars in the country.

The move is a blow to Indian Prime Minister Narendra Modi hopes of attracting more foreign investment and broadening India's manufacturing base. India's growth rate, once the fastest among major economies, has slumped to a six-year low of 5%.

Ford is also in the middle of an overhaul of its global operations. It announced a $11 billion restructuring plan in July last year that it says will help it transition to newer technologies such as electric and self-driving vehicles. It has already slashed thousands of jobs worldwide, and announced plans to close down plants in Russia, France and Brazil.

CNN