General Motors of the US is to pay Fiat 1.55bn euros ($2bn; £1.1bn) to get out of a deal which could have forced it to buy the Italian car maker outright.
Fiat is no longer quite as attractive a brand for GM
Fiat had sold GM a stake in 2000, as part of a partnership agreement.
But Fiat's heavy losses have convinced GM - whose own European operations are in the red - to back away.
The pay-off means the two firms will unwind joint ventures, but Fiat will keep supplying diesel engines and the money will allow it to reduce its debt.
Fiat's shares closed 4.2% higher at 6.22 euros on Milan's stock exchange on Monday, having shot up more than 7% in early trading.
"We now have absolute freedom to design our own future," said Fiat chief executive Sergio Marchionne.
Analysts said Fiat seemed to have done well out of the deal, although some predictions had expected a 2bn euro pay-off.
Fiat is to get 1bn euros immediately, with another 550m to follow within 90 days.
The firm is Italy's largest private employer, and a failure to reach an agreement could have had severe consequences for thousands of workers and for the Italian economy.
For its part, GM was keen to ward off any criticism that the deal had been a mistake.
"We needed scale in Europe to get costs down, and we were able to do that in working with Fiat," said GM chief executive Rick Wagoner.
Fiat's cars have lost both money and market share
The Fiat-GM alliance came about in 2000 as an alternative to selling Fiat outright.
German-US car firm DaimlerChrysler had been willing to buy the firm, but Fiat patriarch Gianni Agnelli did not want to give up control.
Instead, GM swapped a 6% stake in itself for 20% of Fiat - and gave Fiat a "put option" to sell GM the rest of the car maker between January 2004 and July 2009.
But despite the alliance Fiat failed to put itself back on track, continuing to lose money and market share.
As a result, the sell-off looked better and better for the Italians - and much worse for GM, which is struggling with its own loss-making European marques Opel and Saab.
The relationship soured further after Fiat sold half its finance arm and recapitalised in 2003, halving GM's stake to 10%.