The decision, after a two-day meeting of GM's board, was welcomed by German Chancellor Angela Merkel, who had lobbied for the Russian-backed Magna bid and could receive a boost from GM's choice in the run-up to an election on September 27.
Analysts said GM had no clear alternative to the Magna deal because of the costs of raising billions of dollars to keep the brand and fund its restructuring.
The deal also represents a victory for Russia, whose government had pushed aggressively to secure itself a foothold in the rapidly consolidating global car market.
Talks on Opel, control of which GM is giving up as part of a U.S. government-orchestrated restructuring, had dragged on for months, fuelling anger among the carmaker's staff, half of whom are in Germany.
Under the Magna deal, Detroit-based GM will retain a 35 percent stake in Opel, with Magna and its Russian partner, state-owned bank Sberbank
I am very happy about this decision. The government's patience and purpose has paid off, said Merkel, describing the deal as a new beginning for Opel.
GM opted for the bid by Magna and its Russian partners, Sberbank and GAZ
The decision was approved by a trust set up to shield Opel while GM went through bankruptcy proceedings, but the trust's board did not back the deal unanimously, highlighting divisions about the logic of Magna's plan.
DEAL NOT YET DONE
Sberbank Chief Executive German Gref said the deal's structure was unprecedented complicated and Thursday's announcement by GM was an important intermediate step but not a final one.
Elsewhere, Opel trust board member Manfred Wennemer, the former head of auto supplier Continental, expressed doubts about whether Magna could make Opel competitive and said the risks of the deal lay with German taxpayers.
Germany had promised 4.5 billion euros ($6.6 billion) in government guarantees if GM opted for Magna, while refusing to support the rival bid from RHJ.
Auto analysts were also skeptical, describing the decision to sell to Magna as political.
This is an industry that is burdened with excess capacity and we've just passed through one of the best opportunities in over a decade to see real capacity taken out of the industry, said Michael Tyndall, an analyst at Nomura International.
GM has controlled Opel, which traces its roots in Germany back to the 19th century, for the past 80 years.
Based in the western city of Russelsheim, it has four plants in Germany that make everything from the three-door Corsa subcompacts to Zafira vans, two factories in Britain under the Vauxhall badge, and major sites in Belgium, Poland and Spain.
It's a relief that there is now a decision, said Anke Rezac, who works in vehicle electronics at Opel's development center in Ruesselsheim.
We now have less uncertainty surrounding ownership although many questions remain. Among all the bad choices we had, Magna is the best option. They know about the auto industry and want to develop the business.
BIG GERMAN PRESENCE
GM said a definitive agreement should be ready to sign in a matter of weeks and predicted the deal would close no later than November 30.
Magna brings with it an understanding of how to cooperate with other companies. Magna understands the auto business. These are all positive elements, said GM Europe head Carl-Peter Forster.
GM had raised concerns about its ability to control its intellectual property and vehicle technology in the Russian partnership and some of its senior management had said the rival bid by RHJ would be easier to implement.
Members of the GM board considered scrapping the sale altogether and keeping Opel, sources told Reuters. But that would have required GM to raise billions of dollars and turn its back on the guarantees offered by Berlin.
A report prepared by financial adviser KPMG and presented to GM's board this week said an earlier estimate of the cost of keeping Opel by GM management had been overly optimistic.
KPMG put the price tag at more than $6 billion, in addition to the $50 billion in U.S. government funding for GM's bankruptcy.
By selling Opel, GM steps clear of the cost of restructuring an operation that lost $2.8 billion last year at a time when it needs to shore up still-faltering sales in its home market, analysts said.
But GM could also lose the opportunity to cut costs as dramatically as the other top-tier automakers such as Toyota Motor Corp <7203.T> and Volkswagen
Opel represented 18 percent of GM's global sales in 2008, second only to its Chevrolet brand.
The deal is a coup for Magna founder and chairman, Frank Stronach, a toolmaker who left Europe half a century ago to start a company that has become one of the world's biggest automotive suppliers.
Magna and its Russian partners have vowed to inject 500 million euros into Opel, which they want to use to make an aggressive push into the Russian market.
They plan to cut 10,000 European jobs, a quarter of those in Germany, but have committed to keeping all the German plants running. Opel's Antwerp plant in Belgium and Vauxhall sites in England are seen at risk.
(Reporting by Madeline Chambers, Sarah Marsh and Paul Carrel in Berlin, Angelika Gruber, Christiaan Hetzner, Michael Shields and Maria Sheahan in Frankfurt, Edward Taylor in Ruesselsheim, and Kevin Krolicki in Detroit; Writing by Noah Barkin; Editing by Dan Lalor and Matthew Lewis)
($1 = 0.6898 euros)