As Occupy Wall Street protesters massed in Lower Manhattan on Thursday morning, Mayor Michael R. Bloomberg was in Midtown, telling an audience of business leaders that the protests were a dire sign of the public’s economic fears.

“We’re coming to a point where Occupy Wall Street is just the beginning, the Tea Party is just the beginning,” he said. “The public is getting scared. They don’t know what to do, and they’re going to strike out, and they don’t know where.”

“Occupy Wall Street had this great saying, and they were chanting it: ‘We don’t know what we want, but we want it now,’ ” the mayor continued, prompting laughter from the crowd, which included Rupert Murdoch.

“And if you think about it, that tells you what the problem is,” he said. “They just know the system isn’t working, and they don’t want to wait around,” he said, for another hollow promise by politicians (the mayor punctuated his remarks with an expletive).

The tone of the mayor’s remarks — at a panel on immigration organized by the Partnership for New York City and the Partnership for a New American Economy — represented a subtle departure from his usual stance on the Occupy Wall Street movement. Over the nearly two months that the protesters occupied Zuccotti Park, the mayor in his public appearances repeatedly expressed his support for freedom of speech, while largely dismissing the protesters’ critique of economic institutions.

At the panel on Thursday morning, he repeated his contention that it would be more productive for the protesters to work to improve the economy, rather than demonstrating, and he criticized those, including politicians, who vilify banks. But he seemed to take the protesters’ anger more seriously than he had before, and to express more concern about possible consequences of the unrest.

His comments echoed remarks he had made on Sept. 16, on his weekly radio program, when he raised the prospect that youth unemployment might cause riots in the United States.

“That’s what happened in Cairo; that’s what happened in Madrid,” he said at the time. “You don’t want those kinds of riots here.”

The Occupy Wall Street protests started the next day.

Mr. Bloomberg was joined on the Thursday panel by the former mayor of Toronto, David Miller, and the founder and chairman of Grupo Salinas, Ricardo B. Salinas Pliego; the moderator was The New York Times columnist Thomas Friedman. The panelists praised the role of immigrants in creating jobs, with Mr. Miller arguing that Canada’s open immigration laws had benefited its economy. Mr. Bloomberg urged the business leaders in the audience to put pressure on President Obama and members of Congress to enact immigration reform, and to threaten to work for their opponents if they did not.

This post has been revised to reflect the following correction:

Correction: November 17, 2011

An earlier version of this post incorrectly stated that former Citigroup Chairman Sanford I. Weill was at the forum at which Mr. Bloomberg spoke. Mr. Weill was not at the event.