US shares ended higher, after a European agreement to tackle government debt eased fears that Europe's fiscal woes would hit the world economy.
Wall Street's main Dow Jones index closed up 1.25%, recovering some ground after it lost 3.6% on Thursday.
The recovery came after European finance ministers agreed that countries which build up high deficits could lose European Union money or voting rights.
European shares closed down, but trimmed their losses in late trading.
The main UK, French and German indexes had lost more than 2% at lunchtime, with London's FTSE 100 below 5,000 for the first time since November.
But the markets later recovered, with the FTSE ending down 0.2% at 5,063, Germany's Dax finishing 0.7% lower, and France's Cac losing 0.2%.
The euro, which fell to its lowest level for four years against the dollar earlier this week, also recovered, up 0.9% to $1.2575.
The meeting of the 27 European Union finance ministers came at the end of another week of turmoil on the markets, as European countries grappled with the aftermath of the debt crisis in Greece.
With additional concerns about the level of debt in Spain, Portugal and other countries, the fear has been that the crisis could harm the wider European economy.
The ministers have agreed to formulate a co-ordinated agreement to tackle similar crises in the future, so they can react quicker and more efficiently.
Earlier in the day, the German parliament approved its part of the 750bn euro ($941bn; £650bn) bail-out for the eurozone.
Flight to quality
The fall in stock markets has gone hand-in-hand with a more general flight to quality across financial markets in recent days, as investors dump what they see as more risky assets and shift their money into safer havens.
Government bonds perceived as safe - including US Treasuries, German Bunds and UK gilts - have rallied in tandem with the falling stock prices in recent days.
Meanwhile, corporate bonds and some commodities have been falling.
US light crude oil fell 76 cents to end Friday trading at $70.04 a barrel, while the UK's Brent crude lost 16 cents at $71.68.