ROHNERT PARK, California (Reuters) - The sudden rise in long-term borrowing costs in recent weeks suggests that the Federal Reserve's policy of keeping rates low for so long may have led to some excessive risk-taking in financial markets, a top Fed official said on Friday.

Rates rose after Fed Chairman Ben Bernanke said last week the U.S. central bank could start trimming its massive bond-buying program later this year. The increase in rates was partly due to markets adjusting to the idea that the Fed will eventually end a long period of low rates, San Francisco Federal Reserve Bank President John Williams told reporters after a speech here.

"But some of it might indicate that there was a building amount of froth in certain segments" of financial markets, he said. "It's healthy to get some froth out of the market."

Williams also said he had backed off from his earlier view that the Fed should start cutting back on QE3 this summer in part because inflation has been lower than he expected.

"With every passing month, that adds a little bit to my angst around, is this really transitory," he said of inflation data. "If inflation is lower, that would argue for a little bit more of monetary accommodation, all else equal."

If inflation continues to stay well below the 2-percent target, he said, the Fed may need to increase, not reduce stimulus.

Williams had said as recently as last month that the Fed could reduce its bond-buying program by summer and end it before the end of 2013.

(Reporting by Ann Saphir; Editing by Chizu Nomiyama)

The sudden rise in long-term borrowing costs in recent weeks suggests that the Federal Reserve's policy of keeping rates low for so long may have led to some excessive risk-taking in financial markets, a top Fed official said on Friday.

Rates rose after Fed Chairman Ben Bernanke said last week the U.S. central bank could start trimming its massive bond-buying program later this year. The increase in rates was partly due to markets adjusting to the idea that the Fed will eventually end a long period of low rates, San Francisco Federal Reserve Bank President John Williams told reporters after a speech here.

"But some of it might indicate that there was a building amount of froth in certain segments" of financial markets, he said. "It's healthy to get some froth out of the market."

Williams also said he had backed off from his earlier view that the Fed should start cutting back on QE3 this summer in part because inflation has been lower than he expected.

"With every passing month, that adds a little bit to my angst around, is this really transitory," he said of inflation data. "If inflation is lower, that would argue for a little bit more of monetary accommodation, all else equal."

If inflation continues to stay well below the 2-percent target, he said, the Fed may need to increase, not reduce stimulus.

Williams had said as recently as last month that the Fed could reduce its bond-buying program by summer and end it before the end of 2013.

(Reporting by Ann Saphir; Editing by Chizu Nomiyama)