Thousands of demonstrators filled public squares, parks and streets in the country’s three largest cities on Saturday to protest President-elect Donald J. Trump, part of a wave of dissent that has swelled since the presidential contest last week.

They were transgender people, the children of immigrants, and parents toting infants on their back. They were families, students, and men and women of all ages and races. Many carried cardboard signs — “Show the world what the popular vote looks like,” read one, “Putin Won,” said another. As throngs marched through city streets, the participants joined in a cry of “Not my president!”

In one of the largest anti-Trump demonstrations since his election on Tuesday, a mass of people marched from Union Square in Manhattan to Trump Tower, the headquarters and home of Mr. Trump. Protesters marched around one of Mr. Trump’s buildings in Chicago. In Los Angeles, thousands of people marched up Wilshire Boulevard, forming a crowd that stretched for nearly a dozen blocks.

“I’m just doing my part in democracy,” said Alfred Diaz, 25, who joined the protest in Los Angeles. “I feel that this is a way for me to voice my opinion.”