WASHINGTON — A senior Federal Reserve official sought to soothe financial markets on Friday, emphasizing that the Fed is paying attention to investors’ concerns that the economic expansion is weakening.

John Williams, the president of the Federal Reserve Bank of New York, defended the Fed’s decision to raise its benchmark interest rate on Wednesday, and said the central bank expected economic growth to remain strong enough that it would need to continue raising interest rates in 2019.

But he said plans were not promises and that, if the economy weakens, the Fed will adjust.

“We’re going to go into the new year with eyes wide open, willing to read the data, listen to what we’re hearing, reassess our economic outlook and take the right policy decisions that will keep this economy strong,” Mr. Williams said in an interview with CNBC that aired shortly after markets opened on Friday.

The emphasis on flexibility drew an immediate reaction from investors. The S&P 500 stock index rose as Mr. Williams spoke, briefly posting a 1 percent gain. But Mr. Williams’s message was not enough to reverse the downward momentum in equity markets, which have been rattled by the prospect of a government shutdown on top of global economic weakness and trade uncertainty. By the end of the day, the S&P index was down 2.1 percent to end the worst week for American equity markets since the 2008 financial crisis.