"We have an agreement," Finance Minister Peer Steinbrück told reporters following marathon, late-night talks between top German politicians, US government officials and executives from GM and Magna.
The deal, which will see GAZ making Opel vehicles in Russia, backed by Russia's state-controlled Sberbank, goes some way to securing the future of GM's operations in Europe and tens of thousands of jobs in Germany -- a boost to the country's politicians only four months before elections.
Although the decision on the fate of GM's European operations rests with Washington and GM itself, Berlin plays a key role as Opel employs 25,000 workers and the German government will have to stump up billions of euros in loan guarantees.
"You can be certain that we did not take this decision lightly, as all participants were very aware of the risks," said Steinbrück.
"But you have to weigh these risks against the risks that would have arisen if Opel were to be declared insolvent," he added.
He said that agreement had been clinched on the three main sticking points: the creation of a trusteeship that would protect Opel in the event of a GM insolvency, loan guarantees and a bridging loan to keep the firm solvent.
Berlin is expected to provide some €4.5 billion ($6.4 billion) in loan guarantees as well as €1.5 billion in temporary loans to keep Opel afloat.
For its part, Magna has said it will inject some €700 million into the ailing firm but will slash some 10,000 jobs across Europe as part of the plan, with 2,500 of these in Germany.
Under the proposal, GM would keep 35 percent of the company and Opel's workers would retain 10 percent. Magna would hold a 20 percent stake and Sberbank 35 percent.
The Canadian company, front runner in the race to snap up Opel from the beginning, fought off rival bids from Italian car maker Fiat and Brussels-based investment firm RHJ International.
Fiat dramatically pulled out of talks on Friday saying it was unwilling to expose itself to "unnecessary and unwarranted risks" and that it had insufficient information on Opel.
The firm's boss, Sergio Marchionne, was philosophical about Magna's victory, telling reporters in Montreal that he was mainly focused on completing a merger with Chrysler.
"If the Opel transaction is not available for Fiat, life will move on. We will continue to work with what we have," Marchionne said, before the deal was struck in Berlin.
An earlier round of all-night talks collapsed acrimoniously on Thursday, with Berlin accusing GM and the US government of moving the goalposts at the last minute and using "scandalous" negotiating tactics.
GM suddenly demanded some €300 million euros ($423 million) more than expected in temporary bridging loans, on top of the €1.5 billion Berlin has already said it would provide.
In total, GM employs about 55,000 people Europe-wide, including around 7,000 in Spain, 4,700 in Britain at Vauxhall, 4,000 in Sweden at Saab, 3,600 in Poland, 2,600 in Belgium and 1,800 in Italy.