U.S. stocks rose on Friday after the Federal Reserve cut the discount rate at which it lends to banks in a surprise move to keep worsening credit conditions from hurting the economy.

But the major stock indexes were off their session highs in heavier-than-normal trading volume as investors remained cautious there may be more volatility ahead.

World markets have worried that deteriorating credit conditions, which began in the U.S. subprime mortgage market, would spread and damage global economic growth.

Before the U.S. stock market opened, the Fed announced it cut the discount rate by half a percentage point to 5.75 percent, explaining risks to economic growth have increased appreciably.

The markets are having a relief rally, said Tim Woolston, portfolio manager at Boston Advisors Inc. The Fed's move does change the landscape for some investors so they may be more willing to put money to work.

But I think you may well test the lows again at some point.

The Dow Jones industrial average was up 176.80 points, or 1.38 percent, at 13,022.58. The Standard & Poor's 500 Index was up 27.15 points, or 1.92 percent, at 1,438.42. The Nasdaq Composite Index was up 43.76 points, or 1.78 percent, at 2,494.83.

The day also marks the monthly expiration of August options, which could create volatility as traders at the last minute adjust derivative positions against stock and index products.

Shares of banks and brokerages, beaten down in the credit market turmoil, surged as some bargain-hunting investors scooped them up. An index of S&P financial shares climbed 3.2 percent, with JPMorgan Chase and Citigroup giving a big boost to the benchmark index. JPMorgan shares rose 4.1 percent to $47.31 and Citigroup gained 2.4 percent to $48.68.

Mortgage-related shares, which have borne the brunt of the markets' recent pummeling rose.

Shares of Countrywide Financial Corp, the largest U.S. mortgage lender, were up 11 percent at $21.03. Investment bank Bear Stearns Cos., the biggest mortgage bond underwriter, rose 1.3 percent at $117.93.

Shares of Exxon Mobil gained as oil prices rose. Crude rebounded as the Fed's move eased concerns that credit conditions would hurt economic growth and crimp demand for oil. U.S. crude added 90 cents to $71.90 a barrel. Exxon shares rose 4 percent to $83.91, leading the major advancers in both the Dow and the S&P 500.

The Fed's action was designed to give banks confidence that they will continue to have access to capital and help counteract lenders' growing reluctance to make loans.

The federal funds rate, the central bank's main tool for managing monetary policy, was left unchanged at 5.25 percent.

Stocks trimmed their sharp morning gains after the Reuters/University of Michigan consumer sentiment index showed a steeper-than-expected decline in August.