Updated

Concerns that Europe's debt crisis could drag down parts of the continent's banking system rattled global markets on Friday, while the IPO of social network Facebook failed to buoy spirits on Wall Street.

Ratings agency Moody's downgraded 16 Spanish banks late Thursday, three days after downgrading 26 Italian lenders, noting they are vulnerable to huge losses on government debt.

In Spain's case, the lenders are also exposed to tens of billions of euros (dollars) in soured investments in the country's imploded real estate market. Their bad loans have hit an 18-year high, according to new figures compiled by the Bank of Spain.

Worries over Spain were reignited in the past two weeks by the prospect that Greece might leave the 17-country euro union. Anti-bailout political parties made huge gains in general elections on May 6, though that ballot proved inconclusive. Another election will be held on June 17, and the radical left party Syriza is forecast to make gains, possibly becoming the biggest party.

Syriza rejects the international bailout — and the related austerity measures — that the former government negotiated.

But without that rescue package, Greece will likely default and have to leave the eurozone. That would result in financial disaster for Greece and send shockwaves through European markets, destabilizing other weak countries.

Fitch ratings agency downgraded Greece to the lowest possible grade for a country not in default on Thursday, noting that if the next elections do not produce a government that supports the bailout, Greece's exit from the eurozone "would be probable."

After a day of volatile trading, Britain's FTSE 100 closed 0.7 percent lower at 5,267.62 while Germany's DAX dropped 0.6 percent to 6,271.22. France's CAC-40 shed 0.1 percent to 3,008.

Spain's main stock index recovered 0.2 percent from heavy losses on Thursday, thanks mainly to a bounce back in the shares of state-controlled lender Bankia, which had plummeted on Thursday on reports of an increase in deposit withdrawals. They rose 23.5 percent on Friday, more than making up for a 14 percent drop the previous day.

Wall Street tracked European stocks lower on Friday after Facebook shares failed to sustain early gains on their first day of trading. The stock surged 10 percent before falling back to trade around $39, just above the $38 initial offer price.

The Dow Jones industrial average was down 0.4 percent at 12,397.69 and the S&P 500 lost 0.4 percent to 1,299.88.

In Asia, Japan's Nikkei 225 tumbled 3 percent to close at 8,611.31, its lowest finish in four months as signs of weakness in the U.S., a critical export market for Japanese companies, battered some of the country's behemoth manufacturers.

Hong Kong's Hang Seng dropped 1.3 percent to 18,951.85 and Australia's S&P/ASX 200 slid 2.7 percent to 4,046.50. South Korea's Kospi tumbled 3.4 percent to 1,782.46. Benchmarks in Singapore, Taiwan and New Zealand also fell.

Mainland Chinese shares lost ground, with the benchmark Shanghai Composite Index losing 1.4 percent to 2,344.52. The Shenzhen Composite Index fell 1.5 percent to 940.91.

Benchmark oil for June delivery was down 77 cents to $91.79 a barrel in electronic trading on the New York Mercantile Exchange. The contract fell 25 cents to settle at $92.56 in New York on Thursday.

In currencies, the euro fell to $1.2711 from $1.2714 late Thursday in New York. The dollar rose slightly to 79.32 yen from 79.28 yen.

___

Pamela Sampson in Bangkok and Fu Ting in Shanghai contributed to this report.