President-elect Donald Trump addresses supporters at an election night event at a New York hotel November 8. He was elected the 45th president of the United States. (Ricky Carioti /The Washington Post)

Donald Trump, a New York real estate developer and former reality television star, was elected president of the United States on Tuesday, stunning many political observers and pollsters who expected a victory from his rival, Hillary Clinton.

Trump, the Republican nominee, had no political experience before he announced his campaign to shake up Washington and “make America great again.”

At 70 years old, he is the oldest president ever elected to the White House, and the first to take the office without any experience in politics or in the military.

He won at least 276 electoral votes, defeating Clinton, the Democratic nominee, with a majority in the electoral college. Voting counts are still being finalized, but as of Wednesday morning Clinton had a slight edge in the popular vote.

If that lead holds, Trump will become the fourth candidate in history to win the electoral college but not the popular vote, following fellow Republicans Rutherford B. Hayes in 1876, Benjamin Harrison in 1888 and George W. Bush in 2000. John Quincy Adams also lost the popular vote in 1824 but earned the presidency, after no one won a majority of electoral college votes and the House of Representatives decided the race.

Members of the public surround U.S. Democratic presidential nominee Hillary Clinton as she casts her ballot in Chappaqua, New York. Clinton lost several key states that typically vote Democratic. (Brian Snyder/Reuters)

Election Day returns also gave Republicans continued majorities in the House and Senate on Tuesday, handing the party control of both Congress and the White House for the first time in a decade.

“Now it’s time for America to bind the wounds of division,” Trump said early Wednesday morning, shortly after Clinton called him to concede the election. “We have to get together. To all Republicans, Democrats and independents across the nation, I say it is time for us to come together as one united people.”

Trump and his running mate, Indiana Governor Mike Pence, focused their campaign on national security, bringing change to Washington politics and fighting for U.S. workers hurt by changes in the global economy.

Immigration was a central part of Trump’s platform. To protect American jobs and keep criminals out of the country, Trump has said he will force millions of illegal Mexican immigrants to leave the country and he will build a wall to keep others from illegally crossing the Southern border. In December, he called for a ban on Muslims entering the United States, citing concerns over Islamic terrorism. Politicians from both parties condemned the proposed ban, saying that it was discriminatory and probably unconstitutional.

Trump has expressed doubts about climate change and said that he would withdraw the United States from the Paris agreement, which officially went into effect Friday and aims to reduce global greenhouse gas emissions. The majority of scientists say that human-caused climate change is real.

Clinton, a lawyer and former first lady whose husband, Bill Clinton, was president from 1993 to 2001, served two terms as a senator from New York and was secretary of state during President Obama’s first term.

Her campaign was hurt in recent days by a renewed FBI investigation over her use of a private, nongovernmental email account as secretary of state. The FBI director, James B. Comey, said Sunday that Clinton should face no charges over the way she handled classified government information through her email.

During the second presidential debate, Trump threatened to jail Clinton over her email practices if he was elected president.

Trump’s campaign faced problems of its own. The candidate was criticized for refusing to release his tax returns, which would reveal information on money he gave to charity and on business investments that could be a problem while serving as president.

A video taken in 2005, released for the first time one month ago, showed him bragging about touching women without their permission. Following the video’s publication by The Washington Post, one dozen women accused Trump of harassment or misconduct. Trump denied the allegations.

Polls taken by The Post and other news organizations in recent days showed Clinton holding a narrow lead over Trump, which was similar to the edge that Obama had when he beat Republican candidate Mitt Romney in 2012.

Trump won in part by taking several reliably Democratic states, including Wisconsin and Pennsylvania, and by winning toss-up states such as Florida, Ohio and North Carolina.

President-elect Donald Trump takes office January 20.