BERLIN, Germany (CNN) -- A Canadian auto parts supplier has come to the rescue of German carmaker Opel, negotiating a deal with the German government that will save the company from insolvency.
German Finance Minister Peer Steinbrueck talks to reporters early Saturday morning following talks on Opel.
Officials from all sides announced the agreement after talks lasting into the early hours of Saturday.
German Foreign Minister Frank-Walter Steinmeier called it a "responsible solution" that would preserve the highest number of jobs.
Under the terms of the deal, supplier Magna will have a 20 percent stake in GM Europe, an arm of General Motors, which owns the Opel brand.
Russia's Sberbank will own a 35 percent share, Opel employees will have 10 percent, and General Motors will retain a 35-percent stake, according to GM spokesman Joerg Schrott.
The German government will provide a bridge loan to keep GM Europe operating in the short term.
The deal ensures that General Motors' European assets -- which also include the Vauxhall car brand in Britain -- will be unaffected by GM's expected bankruptcy filing.
Magna warned during negotiations that it would have to cut about 10,000 jobs. General Motors has around 55,000 employees in Europe.
About 2,000 of the job cuts would be in Germany, Magna has said, but a top company official tried to reassure the Germans that it would try to protect the company as much as possible.
"We will, and I want to stress that again, preserve all the German Opel locations," said Magna co-Chief Executive Siegfried Wolf.
"We're keen to have talks with all the states where Opel has factories in the next few weeks and are confident to be able to find solutions to preserve jobs, because every job that is lost is one too many. We will work with Opel management to try to avoid those job losses."
Steinmeier told reporters that such risks can't be avoided.
"But," he said, "I think we have found a responsible solution with private investors and interim funding from the state. It is a solution which preserves Opel's location in Germany and also preserves the highest possible number of jobs."
German Finance Minister Peer Steinbruck said early Saturday that the country has guaranteed transitional credit for Opel of 1.5 billion euros ($2.1 billion). In addition, a trust will be created where Opel's stock will be parked prior to the division of shares.
Along with Sberbank, Russia's biggest bank, Russian automaker GAZ Group will provide some financing, said Andrzej Kasperek, director of corporate business development with GAZ.
"I think the whole arrangement with Magna and the Russian partners made this a very attractive deal for GM," Kasperek said. "Opel is very well regarded as a brand. But we think we can increase sales in the next five years."
Financially strapped General Motors is expected to announce as soon as Monday that it is filing for bankruptcy.
"Opel has received a perspective for the future," said German Chancellor Angela Merkel after the agreement was reached. "That is a chance for the employees, who have earned it, as I find, because they are not to blame for the situation but instead big mismanagement in the United States of America at GM."
Merkel said the German government did "what it had to do" in rescuing Opel.
"I had an open exchange in a phone call with the American president, and we agreed that we do everything to bring this complex task to a good conclusion. And this clearly set the tone for the negotiations," Merkel said.