Credit…Brittany Greeson for The New York Times

Ford Motor said on Thursday that it was planning to invest $3.7 billion in facilities across the Midwest, much of it for the production of electric vehicles, which the company said would create more than 6,000 union jobs in the region.

“We’re investing in American jobs and our employees to build a new generation of incredible Ford vehicles,” Jim Farley, the company’s president and chief executive, said in a statement. “Transforming our company for the next era of American manufacturing requires new ways of working.”

The announcement, made jointly with the United Automobile Workers union, detailed investments in three states. Ford said it would invest $2 billion and create about 3,200 union jobs in Michigan, including many tied to production of the new F-150 Lightning pickup truck, the company’s highest-profile and most important bet on electric vehicles.

In Ohio, Ford will spend over $1.5 billion and create nearly 2,000 union jobs, primarily to build commercial electric vehicles in the middle of this decade. The company also said it would add over 1,000 union jobs at an assembly plant in Kansas City, Mo., that will produce commercial vans, some gas-powered and some electric.

The company had indicated that some of the investments would be coming, like the expansion of production capacity for the F-150 in Michigan, but had not detailed the magnitude.

The moves follow Ford’s announcement last year that it would build four factories in Kentucky and Tennessee — three battery factories for electric vehicles and a truck assembly plant — irking union officials and elected leaders in Midwestern states, who worry about losing manufacturing jobs to the South.

In addition to the new Midwestern jobs, Ford said it would convert nearly 3,000 temporary jobs into permanent full-time positions before the date that its contract with the U.A.W. calls for — which is after two years of employment.

We are always advocating to employers and legislators that union jobs are worth the investment,” the U.A.W. president, Ray Curry, said in a statement. “Ford stepped up to the plate by adding these jobs and converting 3,000 U.A.W. members to permanent, full-time status with benefits.”

Credit…Brittany Greeson for The New York Times

Sam Abuelsamid, an auto industry analyst at Guidehouse Insights, said the changes were important as a way to help Ford attract and retain labor in a tight job market, while potentially helping the company avoid costly labor unrest during negotiations over a contract that expires next year as it spends billions on the transition to electric vehicles. A six-week strike by workers at General Motors in 2019 cost that company billions of dollars.

“I’m sure one thing Ford would absolutely love to avoid is the potential for a strike,” Mr. Abuelsamid said. “Keeping a positive relationship with the U.A.W. now is to their benefit.”

But the investments appear unlikely to substantially diminish the broader threat that the shift toward electric vehicles poses to the autoworkers union and to employment in the U.S. vehicle manufacturing industry, which stands at around one million.

“It’s about changing the perception of what’s happening,” Mr. Abuelsamid said. “It’s a balancing act between your work force and your investors,” who would prefer to see labor costs rise more slowly or decline at unionized automakers like Ford and General Motors.

Because electric vehicles incorporate far fewer moving parts than gasoline-powered vehicles, they require significantly less labor — about 30 percent less, according to figures that Ford has generated.

As a result, estimates suggest that the toll of electrification on auto industry jobs could be significant absent large new government subsidies. A report released in September by the liberal Economic Policy Institute, which has ties to organized labor, found that the auto industry could lose about 75,000 jobs by 2030 without substantial government investment.

By contrast, the report found, if additional government subsidies encourage the domestic manufacturing of components and greater market share for vehicles assembled in the United States, the industry could add about 150,000 jobs over the same period.

President Biden has backed substantial subsidies for electric vehicles, including vehicles made by unionized employees, but those measures have languished in the Senate and their prospects are uncertain.

In the meantime, much of the job growth tied to electric vehicles has occurred at nonunion facilities owned by newer automakers like Tesla, Rivian and Lucid, or U.S.-based battery facilities owned wholly or in part by foreign companies like the South Korean manufacturers SK Innovation and LG Chem.

In Thursday’s announcement, Ford noted that its new battery and vehicle production facilities in the South would create about 11,000 jobs. But those employees will not automatically become union members, and workers in those states tend to face an uphill battle in unionizing.

For investors, however, Ford’s additional investments in electric vehicles appears to be welcome news as the company seeks to reinvent itself amid competition from the likes of Tesla and Rivian. Ford’s stock price, which had dropped substantially this year, rose more than 2 percent on Thursday.

Ford also said Thursday that it sold 6,254 electric vehicles in May, a jump of more than 200 percent from a year earlier. That number included 201 F-150 Lightnings, which the company started producing in April.

The company has about 200,000 reservations for the Lightning, which is central to its efforts to catch up to Tesla, and stopped accepting new ones because production will take months to meet demand.

Ford indicated that sales of the truck would be much higher in the coming months as production increased and trucks in transit reached dealerships. Ford is aiming to produce 150,000 Lightning trucks a year by the end of 2023.

Sales of electric vehicles — and conventional cars — have been limited by a shortage of computer chips. Ford’s overall sales of new vehicles in May fell 4.5 percent from a year earlier. Auto executives are also increasingly worried that the supply of lithium, nickel and other raw materials needed to make the batteries that power electric cars is not keeping up with the growing demand for those vehicles.

Vikas Bajaj contributed reporting.