The region is still a prime source of engineering talent and manufacturing know-how, as well as a technology incubator for electric cars and self-driving systems. Mahindra already has a design and engineering center in Troy, half an hour north of Detroit, that turns out prototypes of future vehicles.

Other foreign companies have also made big investments in the Detroit area and throughout the upper Midwest. Chinese firms have bought a former General Motors steering-gear division in Saginaw, Mich., and an automotive glass plant in Moraine, Ohio. One of the largest auto suppliers in Detroit is the Indian firm Sakthi Automotive, which is expanding its operations into a long-shuttered high school on the city’s hardscrabble southwest side.

Detroit’s mayor, Mike Duggan, has made rebuilding the city’s depressed industrial base a priority, and last year lured the auto-parts supplier Flex-N-Gate — owned by a Pakistani native, Shahid Khan — to construct a $95 million factory near downtown.

“It’s the kind of development that Detroit has not been able to compete for in recent years,” Mr. Duggan said at the plant’s groundbreaking last year. “But we are starting to compete now.”

Image Anand G. Mahindra, chairman of the Mahindra Group, whose company is expanding its American presence. Credit... Sean Proctor for The New York Times

Mahindra’s footprint in the Detroit area is small so far, with $230 million invested in the plant, the technical center and two related operations that employ about 270 people combined. The Auburn Hills site where the company is building its factory, in Detroit’s northern suburbs, had been empty for years after housing an engineering firm.

The company expects to build about 5,000 off-road vehicles in the plant’s first year, then add capacity to more than double the volume.