The world’s leading central banks will step in to try to make dollars available to European banks in a new coordinated step announced Thursday meant to ease the funding problems that are accompanying a debt crisis on the continent.

The European Central Bank, working with the Federal Reserve, will offer three-month loans in dollars to banks in the 17 nations that use the euro currency in an effort to avert shortages of dollars and a return to the jittery, fearful days of late 2008.

The joint announcement — the central banks of Britain, Japan and Switzerland are also participating — is an attempt to prevent a crisis of confidence in the debt of Greece and other European countries from becoming an all-out global banking disaster.

Global markets surged on the news. The Standard & Poor’s 500 index in the United States closed up 1.7 percent, and the German stock market closed up 3.2 percent. The euro currency rose 0.8 percent, to $1.39. The rise came despite news that a rogue trader had incurred losses of $2 billion at the Swiss bank UBS.

The Fed will effectively lend dollars to the ECB and other world central banks through swap lines, which have been used in varying amounts since late 2007 to address dollar shortages in the world financial system. The ECB will, in turn, make those dollars available to European banks, the Swiss National Bank to Swiss banks, and so on, in the form of three-month loans at a fixed interest rate.

U.S. officials view the action as a way to support Europe’s efforts to contain its crisis while incurring no real risks of their own: It is the ECB and other central banks that the Fed is doing business with and that are on the hook financially, not international banks themselves.

It is hoped that the loans will give banks some relief from the funding strains they often suffer near the end of the year. Banks wish to appear financially solid as they prepare to publicly report their financial positions, and so all want to shift into cash and away from riskier assets at the same time.

This step will also stop banks from having to rely on overnight cash that they lend to one another or on the seven-day dollar loans that the ECB normally offers.

In effect, the world’s central banks are dusting off a tool used extensively during the 2008 financial crisis to try to keep the current wave of worry from turning into an outright panic. Those swap lines that the Fed used to offer dollars to European banks were little discussed in the United States amid the U.S. central bank’s controversial bailout of AIG and its other extraordinary steps that fall. ECB President Jean-Claude Trichet has described the swap lines as critical to avoiding a much deeper crisis in the world banking system.

The new lending program comes as European leaders are struggling to reach agreement on a broader solution to the woes afflicting Europe. In Athens on Thursday, the Cabinet was holding a tense meeting about budget cuts and further austerity in a bid to bring the country’s financial picture in line with European Union targets for issuing more bailout money. Both German Chancellor Angela Merkel and French President Nicolas Sarkozy told Greek Prime Minister George Papandreou on Wednesday that they would support his country so long as it met the tough spending goals.

On Thursday, Merkel categorically ruled out one tool that could ease Greece’s pain — euro-zone bonds that troubled countries could use to borrow money with the full credit-worthiness of the euro area behind them. Those so-called eurobonds, which would rely heavily on Germany’s financial backing, are “absolutely wrong,” Merkel said, according to wire services.

No “onetime thunderbolt” would do the trick, she said, in a speech at the Frankfurt Auto Show, adding that stabilizing the euro area would take time. But she reiterated Germany’s broader support for addressing the crisis, saying her country had a “duty and responsibility” to secure the future of the euro.

Markets were up for a third straight day despite news that a rogue trader at Swiss banking giant UBS may have cost the bank $2 billion, potentially forcing a third-quarter loss for the firm. London police said Thursday that they had detained a man in connection to the trading.

Merkel, Sarkozy and Papandreou spoke Wednesday night in an emergency three-way phone call, and statements afterward expressed support for Greece to remain in the euro area and a promise from Greece to meet austerity targets and other economic measures as a precondition to receiving a new tranche of money. But the leaders released no new details about steps being taken to support Greece.

Birnbaum reported from Berlin.