Around 2 p.m., as Mr. Trump ate lunch on Capitol Hill with lawmakers and supporters, the protests expanded and turned violent. Protesters hurled rocks and bricks at police officers several blocks from the parade route. Officers with helmets and riot shields tried to disperse the protesters by using flash grenades and pepper spray.

After being pushed back a block, protesters outside the Washington Post building lit a fire in the middle of the street, smashed the windows of a limousine and then lit it on fire. The police, using more flash grenades, cleared a path for fire trucks as protesters retreated to a park.

The violence attracted a throng of onlookers, journalists and peaceful protesters who had marched earlier in the day.

Reed Arahood, 34, of Massachusetts, who had come to Washington to be part of the peaceful protests, said she was ambivalent about the violence.

“I don’t think I have words to accurately describe how I feel about them,” she said about the protesters. She added that she felt “solidarity” but also was “absolutely” concerned about the image of violent protests.

But over all the scene of thousands of protesters gave her hope.

“I feel pretty proud of the number who showed up today,” she said. “Looking strangers in the eye and knowing that we’re together and talking with people from all over the country who have come here to express their concerns about what is going to happen in the next four years and what is already happening in our country. I feel really good about that.”