The German government has approved a deal for a Magna-led consortium to take a majority stake in Vauxhall/Opel.
After a second round of high-level talks in Berlin, a deal was reached late on Friday night.
Germany's finance minister Peer Steinbrueck said: "A solution has been found to keep Opel running. You can be sure that we did not take the decision lightly. All the federal and state representatives are aware there are some risks."
Under the agreement Opel will be placed under the care of a trustee. This will protect it from General Motor's expected filing for bankruptcy protection early next week.
Under the terms of the deal Germany's federal government is providing in a loan of US$2.1 billion to help fiannce the deal. It will have to be paid back at a later date.
Magna co-CEO Siegfried Wolf said he expects agreements with GM to be signed in five weeks time.
"We really have taken the risk that was necessary to show a commitment, and we are committed, otherwise we wouldn't have done this deal," Wolf said.
Under the deal Magna will take a 20 per cent stake in Ope, the Russian-owned Sberbank will take a 35 per cent stake, giving their consortium a majority. GM will retain a 35 per cent holding, while the remaining 10 per cent will go to Opel employees.
Vauxhall/Opel's parent company GM is expected to enter a period of bankruptcy protection next week, in the same manner as Chrysler. GM will be 72.5 per cent owned by the US government under the deal.
Magna has said it will inject between 500m (£437m) and 700m (£612m) Euros into Opel, assuming the deal gains government approval.
It also plans to cut 2500 jobs in Germany, about 10 per cent of Opel's workforce in that country. Fiat had said it would cut 10,000 jobs.
It is not known what its plans for Vauxhall's plants in Luton and Ellesmere Port in the UK are. However, the European Commission gathered members at a meeting yesterday to discuss concerns that job cuts resulting from the deal will be concentrated outside Germany.
A statement from the EC after the meeting said any state support should "not include non-commercial conditions concerning the location of investments and/or the geographic distribution of restructuring measures". Germany said the loan to Opel would benefit plants in all countries.