NEW YORK (CNNMoney.com) -- Stocks rallied Tuesday as investors welcomed news that the Federal Reserve will lend up to $200 billion to banks and lenders as a means of loosening up tight credit markets.

According to early tallies, the Dow Jones industrial average (INDU) jumped almost 417 points, its fourth-biggest one-day point gain ever and the biggest one-day point gain since July 2002. In percentage terms, the gain of 3.55% was the best since March 2003.

The blue-chip index had ended the previous session at a 17-month low.

The broader Standard & Poor's 500 (SPX) index climbed 3.7% after ending the previous session at a 19-month low. It was the biggest one-day percentage gain since May 2002.

The Nasdaq composite (COMP) jumped almost 4% after ending the previous session at its lowest level in 18 months. It was the biggest one-day percentage gain since March 2003.

The advance had lost a little steam in the late morning before recharging in the afternoon.

The Fed will make up to $200 billion available to a group of 20 big investment firms for a term of 28 days, rather than overnight. The program is being coordinated with central banks worldwide. (Full story)

While the announcement was a big positive psychologically, it also coincided with a market that was ready to rally after having slumped over the last few sessions.

"This was a very oversold market, and today we're just seeing a short-covering relief rally," said Ram Kolluri, president at Global Investment Management. "We're not off to the races now."

He said that the market is in 'full-blown panic mode' in the financial sector and has been down sharply of late, and the Fed news Tuesday is providing investors with an incentive to cover some short positions.

The actual impact on the banking system will be minimal, said Robert Loest, portfolio manager at Integrity Funds, saying the government's need to borrow money could absorb half of the $200 billion in 30 days. But the announcement has a psychological impact, and that's why stocks are responding today, he said.

"It's not that there isn't enough money out there, it's not a liquidity issue," Loest said. "It's a confidence issue."

"I think the market is in a process of a psychological bottoming," he said.

Investors, cheered by the injection of liquidity into the system, looked beyond oil and gas prices at record highs. Oil prices surged to a new record trading high of $109.72 a barrel before retreating, while gas prices hit $3.2272 a gallon at the pump, just above the all-time record from last May.

Stock gains were broad based Tuesday, with 29 of 30 Dow stocks rising. Financial components JP Morgan (JPM, Fortune 500), Citigroup (C, Fortune 500), Bank of America (BAC, Fortune 500), American Express (AXP, Fortune 500) and AIG (AIG, Fortune 500) led the advance.

Stocks tumbled Monday for a third straight session on worries that the financial sector will see more writedowns related to the housing and credit crises. Those concerns remained Tuesday, but were countered by the Fed's plan to keep liquidity flowing in financial markets.

Economic news. The trade gap widened in January, the government reported, but the spread between the nation's imports and exports was smaller than what Wall Street economists had forecast.

The economy will see slower growth this year, as the fallout from the housing market continues to hit consumer spending and job growth, but a recession is avoidable, according to the quarterly forecast from the University of California at Los Angeles.

Company news. Bond insurers such as Ambac Financial (ABK) and MBIA (MBI) rallied on the Fed news.

Lenders Countrywide Financial (CFC, Fortune 500), Fannie Mae (FNM) and Freddie Mac (FRE, Fortune 500) all jumped too.

Washington Mutual (WM, Fortune 500) gained on the Fed news and also on rumors that the mortgage lender could receive a cash infusion from Goldman Sachs or Warren Buffett, Reuters reported.

Google (GOOG, Fortune 500)'s $3.1 billion bid for online ad tracker DoubleClick got the OK from European Union regulators, who said that the deal won't hurt competition for online ads. Google shares jumped 4%.

Texas Instruments (TXN, Fortune 500) warned late Monday that first-quarter sales and earnings won't meet forecasts. Shares lost 4.6%.

WellPoint (WLP, Fortune 500) warned late Monday that 2008 earnings won't meet forecasts, due to higher medical costs and a lower-than-expected subscribers. Shares tumbled 28%.

McDonald's (MCD, Fortune 500) and Boeing (BA, Fortune 500) were the Dow's only losers. Boeing slipped after it said late Monday that it will formally protest the $35 billion refueling tanker deal awarded to rivals EADS and Northrop Grumman.

Market breadth was positive. On the New York Stock Exchange, winners topped losers more than 4 to 1 as 1.47 billion shares changed hands. On the Nasdaq, advancers topped decliners nearly 3 to 1 on volume of 2.06 billion shares.

Other markets. U.S. light crude oil for April delivery rose 85 cents to settle at $108.75 a barrel on the New York Mercantile Exchange. The front-month contract ended the previous session at a record closing high of $107.90.

COMEX gold for April delivery soared $4.20 to $976 an ounce.

In currency trading, the dollar touched a fresh record low against the euro and fell versus the yen.

Treasury prices slumped, raising the yield on the benchmark 10-year note to 3.59% from 3.45% late Monday as investors took profits. Bond prices and yields move in opposite directions.