NEW YORK (CNNMoney) -- The Federal Reserve and four other powerful central banks threw a lifeline Thursday to Europe's struggling banks.
The European Central Bank -- along with the Fed, the Bank of England, the Bank of Japan and the Swiss National Bank -- announced a coordinated plan to pump dollars into Europe's financial system.
The aim: Provide U.S. dollars to European banks that need the currency to fund loans and repay debt.
European banks have seen outflows of U.S. dollars as U.S. financial institutions and money market accounts have scaled back exposure to European banks amid fears over the institutions' exposure to a Greek debt default or another troubled EU member nation.
The central banks will hold three auctions for U.S. dollars, with a three-month maturity, through the end of the year.
The auctions will carry a fixed rate and be conducted as "repurchase operations against eligible collateral," according to the ECB release.
That means that banks can now purchase what's known as a "full allotment" of dollars or as much as the bank has collateral to back it with.
The need for the coordinated response is to limit the currency exposure for each central bank.
When European banks have dollar funding issues, the ECB has limited recourse because it only prints euros. Earlier this week, two undisclosed European banks were forced to get $575 billion in dollar funding, the ECB said in a sepatate statement.
One positive sign in Thursday's news: the October start date for the auctions. That signals that central banks do not see an imminent threat to any one European bank.
"They could open up the swap lines tomorrow if they wanted to. By starting in almost a month's time, it looks like there's no clear present danger," said John Ryding, chief economist at RDQ Economics and a former economic advisor to the Bank of England.
The euro gained 0.8% against the dollar, and U.S. and European markets surged following the announcement.
U.S. stocks rallied as did European markets. Britain's FTSE 100 ( ) gained 2.1%, the DAX ( ) in Germany added 3.2% and France's CAC 40 ( ) rose 3.3%.
European banks also soared on the news. Shares of BNP Paribas spiked 13% in Paris trading. Credit Agricole and Societe General jumped 5.9% and 5.4% respectively.
U.S. banks also rose, with shares of Bank of America (Fortune 500), JPMorgan Chase ( , Fortune 500) and Citgroup ( , Fortune 500) all gaining about 2%, while Goldman Sachs ( , Fortune 500) jumped nearly 3%.,
Analysts say that any offer of aid to European banks is yet another tool the Federal Reserve has to aid the ailing U.S. economy. European banks need dollars to fund loans to U.S. companies and to European corporations with offices in the United States.
"Given how weak the U.S. economy is right now, we think the Fed is cognizant of the spillover risks from a European banking crisis," wrote Win Thin, global head of emerging markets strategy at Brown Brothers Harriman in a research note. "Providing dollar funding appears to be a low cost option."
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||4.22%||4.27%|
|15 yr fixed||3.19%||3.24%|
|30 yr refi||4.23%||4.29%|
|15 yr refi||3.21%||3.27%|
Today's featured rates: