MOSCOW — Thousands of Russians marched through Moscow on Sunday in an antigovernment demonstration criticizing President Vladimir V. Putin for what they saw as his warmongering in Ukraine.

It was the first large-scale public demonstration against Mr. Putin since March, and one that brought out a sizable but often silent minority of Mr. Putin’s critics despite the patriotic fervor that has seized Russia since his annexation of Crimea in March.

“I am disturbed that Russia is fueling a war in Ukraine,” said Sergey Arefov, a lawyer who had attended opposition rallies here before. “I believe it is very dangerous for us and for Europe.”

In his hand he held a small Ukrainian flag, though he said he was nervous to ride with it on the subway. “I hid the flag,” he said sheepishly. “A year ago, I could never have imagined it would come to this.”