Throngs of demonstrators held marches across the United States on Wednesday to protest Republican Donald Trump's surprise victory in the U.S. presidential election, blasting his campaign rhetoric about immigrants, Muslims and other groups.

Trump, 70, was elected the next president, upending most predictions and rising to the nation's highest office despite several controversial statements during his 18 months campaigning.

In New York, thousands of protesters filled streets in midtown Manhattan as they made their way to Trump Tower, while hundreds others gathered at a Manhattan park and shouted: "Not my president."

The protest moved up 6th Avenue, closing part of the street to traffic.

Anti-Trump protesters marching down 14th Street in downtown DC. Chanting, "Not my president!" <a href="https://t.co/F1zysMMvyX">pic.twitter.com/F1zysMMvyX</a> —@matt_kwong

In Chicago, thousands more attempted to gather outside the Trump International Hotel and Tower downtown while chanting phrases like "No Trump! No KKK! No racist USA."

Chicago police closed roads in the area, blocking the demonstrators' path.

"I'm just really terrified about what is happening in this country," said 22-year-old Adriana Rizzo, who was holding a sign that read: "Enjoy your rights while you can."

Faith Attaguile, from Encinitas, yells chants with others on the corner of Broadway and Front Street in downtown San Diego on Wednesday night, during a protest in opposition of Donald Trump's presidential election victory. (Hayne Palmour IV/The San Diego Union-Tribune via AP)

Protesters railed against Trump's marquee campaign pledge to build a wall along the border with Mexico to keep out undocumented immigrants and other policies perceived as affecting people of colour.

"I'm particularly concerned about the rise of white nationalism and this is to show my support against that type of thing," Rizzo said.

A representative of the Trump campaign did not immediately respond to requests for comment about the protests. In his victory speech, however, Trump said he would be president for all Americans, saying, "It is time for us to come together as one united people."

<a href="https://twitter.com/hashtag/TrumpTower?src=hash">#TrumpTower</a> is LIT rn. <a href="https://t.co/HMF3KVTDsl">pic.twitter.com/HMF3KVTDsl</a> —@jasminecomedy

Protests broke out in several other parts of the country, including Oakland, Calif., Portland, Ore., Pittsburgh, Seattle, Philadelphia, Boston, Kansas City, Los Angeles, Minnesota and Austin, Texas.

On Twitter, the hashtag "NotMyPresident" had been used nearly half a million times.

Several hundred people flooded onto one of the busiest freeways in Los Angeles, causing a miles-long traffic backup.

The protesters, who had remained peaceful and not overly disruptive for most of the night, poured on to U.S. 101, which links downtown L.A. to Hollywood, and stayed there for most of an hour. Drivers sat and waited. Many got out of their cars.

The crowd was slowly starting to disperse as many of the demonstrators left the freeway and others were taken into police custody.

There was no violence between officers and protesters.

Protesters carry an effigy of president-elect Donald Trump during a protest in front of Los Angeles City Hall on Wednesday night. (Keith Birmingham/The Pasadena Star-News/SCNG via AP )

The protesters gathered on Boston Common before marching toward the Massachusetts Statehouse, with beefed-up security including extra police officers.

About 6,000 protest in Oakland

Police in Oakland in riot gear blocked thousands of people protesting Donald Trump's election from getting onto the Interstate 90 highway.

The crowd chanting and waving signs gathered in Frank Ogawa Plaza in downtown Oakland in the afternoon. Officials said the crowd had swelled to 6,000 people by evening.

By late Wednesday, two groups that set small fires on streets remained in the area.

A protester lobs a flare signal at police Wednesday in Oakland, Calif. Police in Oakland blocked thousands of people protesting Donald Trump's election from getting onto a highway Wednesday night. (Marcio Jose Sanchez/The Associated Press)

In Boston, thousands of anti-Trump protesters streamed through downtown, chanting "Trump's a racist" and carrying signs that said "Impeach Trump" and "Abolish Electoral College." Clinton appears to be on pace to win the popular vote, despite losing the electoral count that decides the presidential race.

A protest that began at the Minnesota State Capitol with about 100 people swelled at is moved into downtown St. Paul, the Minneapolis Star Tribune reported. Protesters blocked downtown streets and traveled west on University Avenue where they shouted expletives about Trump in English and Spanish.

Clinton calls for an 'open mind'

Hundreds massed in downtown Seattle streets.

Many held anti-Trump and Black Lives Matter signs and chanted slogans, including "Misogyny has to go," and "The people united, will never be defeated."

Back in New York, several groups of protesters caused massive gridlock as police mobilized to contain them under a light rain.

Democratic presidential candidate speaks to supporters in New York Wednesday 12:07

They held signs that read "Trump Makes America Hate" and chanted "hey, hey, ho, ho Donald Trump has got to go." and "Impeach Trump."

Defeated Democratic presidential candidate Hillary Clinton said today Americans owe Trump "an open mind and the chance to lead."

Speaking Wednesday morning for the first time to supporters since losing the U.S. election, she said: "I hope that he will be a successful president for all Americans."

Clinton didn't give a formal concession speech earlier but called Trump early Wednesday to congratulate him.

"This is painful, and it will be for a long time," Clinton told several hundred supporters at the New Yorker hotel. "And I want you to remember this: our campaign was about building an America that is hopeful, inclusive and big-hearted."

A protester carries an upside down American flag in opposition of Donald Trump's presidential election victory in San Francisco, Wednesday, Nov. 9, 2016. (AP Photo/Jeff Chiu) (The Associated Press)

Trump's triumph over Clinton will end eight years of Democratic dominance of the White House and threatens to undo major achievements of President Barack Obama.

"We must accept this result and look to the future," Clinton said. But she added: "Our constitutional democracy demands our participation not just every four years but all the time ... If we stand together, our best days are ahead."

Trump tapped into anger: Sanders

The devastating loss for the Democratic party, which will no longer hold the White House and will continue to be in the minority of both chambers of Congress, was certain to open painful soul-searching among Democrats, who had endured a lengthy primary between Clinton and Vermont Sen. Bernie Sanders.

The so-called democratic socialist drew strong support among liberals amid an electorate calling for change but then backed Clinton's general election bid.

Berkeley High School students assemble on the UC Berkeley campus in protest Trump's election on Wednesday. (Elijah Nouvelage/Reuters)

Sanders put out a statement Wednesday evening about Trump's win.

"Donald Trump tapped into the anger of a declining middle class that is sick and tired of establishment economics, establishment politics and the establishment media. People are tired of working longer hours for lower wages, of seeing decent paying jobs go to China and other low-wage countries, of billionaires not paying any federal income taxes and of not being able to afford a college education for their kids — all while the very rich become much richer.

"To the degree that Mr. Trump is serious about pursuing policies that improve the lives of working families in this country, I and other progressives are prepared to work with him. To the degree that he pursues racist, sexist, xenophobic and anti-environment policies, we will vigorously oppose him," said the statement.