President Donald Trump may have won a reprieve for thousands of General Motors workers who the company planned to layoff.

The president has hammered GM over its plan to end production and layoff workers at three U.S. factories.

“You know, the United States saved General Motors and for her to take that company out of Ohio is not good. I think she’s going to put something back in soon,” Trump said after the plant closing were announced in November.

Trump continued to blast GM and Barra in an interview with Fox News on Thursday. “I don’t like what she did,” Trump said. “It was nasty. Ohio is going to replace those jobs in two minutes.”

The company said Friday that 2,700 out of the 3,300 U.S. factory jobs slated for elimination will now be saved. Blue-collar workers will still lose jobs at four U.S. plants slated for closure next year, but most will be able to find employment at eight other GM factories where jobs are being added. Some would have to relocate.

GM still plans to lay off about 8,000 white-collar workers and another 2,600 factory workers in Canada.

While some of the roughly 3,300 U.S. factory workers will retire, most of the rest will be offered one of 2,700 jobs the company plans to add at factories where production will increase, GM announced on Friday. Some would have to uproot and move to other cities for jobs.

“Our focus remains on providing interested employees options to transition including job opportunities at other GM plants,” CEO Mary Barra said in a statement of the factory workers.

That still leaves the majority of the 14,000 cuts hitting white-collar workers. A small number of them will be able to transfer to other openings, and those who can’t will get help in finding work elsewhere, the company said.

Since the announcement, GM has faced withering criticism from Trump, legislators from the affected states and the United Auto Workers union, largely over the plant closure plans. Trump has focused on a plant in Lordstown, Ohio, that’s slated to stop making compact cars on March 1. He has promised to return factory jobs to the U.S. and Ohio, a key state in his 2020 re-election campaign.

GM is cutting six car models as buyers have dramatically shifted their preferences to SUVs and trucks, which will account for about 70 percent of new-vehicle sales this year. Just six years ago, that number was 51 percent, and now GM is left with too many factories making cars.

The automaker’s attempt to close the factories still has to be negotiated with the United Auto Workers union, which has promised to fight back. The other factories that could go are assembly plants in Detroit and Oshawa, Ontario, and transmission plants in Warren, Michigan, and near Baltimore.

The announcement that nearly all the blue-collar workers may get other GM jobs could counter some of the attacks, but it’s unlikely to stop them completely since GM still intends to halt production at the factories.

Tommy Wolikow, 36, who was laid off from the Lordstown, Ohio, factory in January of 2017, said he would be interested in openings at a Toledo, Ohio, transmission factory and a plant in Tennessee. But he’s not happy about the prospect of moving. “I want to go back to Lordstown,” he said. “The last thing I want to do is uproot my family and leave my parents.”

Under GM’s contract with the union, the more senior active workers at the four factories targeted for closure get first crack at transferring to another plant, and there may not be enough jobs for workers with less seniority who were previously laid off. Of the 3,300 factory workers slated to lose their jobs, 2,800 are active and 500 are on leave. In addition, there are about 830 who were laid off previously at the Lordstown and Detroit plants.

Patrick Morrissey, a spokesman for GM, said Friday’s job announcement had nothing to do with the criticism the company has been facing. The automaker, he said, knew some of the laid-off workers would be placed at other plants, but it didn’t know the number of jobs available until this week.

“We have opportunities for just about everybody who wants them,” Morrissey said.

Morrissey said the number of workers placed in new posts depends a lot on how many of the senior workers decide to retire. About 1,200 are eligible. Some workers also could decide they don’t want to relocate.

Wolikow is sure if he has enough time in with GM to get a transfer to another plant. He has found work as a diesel engine technician, but it pays $10 per hour less than the $28 per hour plus profit sharing that he’d be making if he was still working for GM.

“It’s hard not to follow the money,” he said. “You know that you can make a great living, have a great career.”

GM said jobs will be added mainly at truck and SUV plants including about 1,000 positions at a Flint, Michigan, factory that makes heavy-duty pickup trucks. GM wouldn’t release exact numbers but said several hundred will be added at each of five assembly plants in Arlington, Texas; Bowling Green, Kentucky; Spring Hill, Tennessee; and Lansing, Michigan. In addition, jobs will be added at a transmission plant in Toledo, Ohio. Another 50 will be added at a casting plant in Bedford, Indiana.

Dave Green, president of the auto workers local at the Lordstown plant, says he’s still hoping the factory can stay open by getting a new vehicle to build. The future of the plants will be part of the UAW’s national contract negotiations next year.

The job transfers will help laid-off workers but will do nothing for the area of Northeast Ohio which has been devastated by job losses over the years, Green said.

“Some people do have the opportunity to move, but it’s extremely disruptive, and it does nothing to help or support the communities that are left behind,” he said.

—The Associated Press contributed to this report.

Follow John Carney on Twitter: @carney.