Democrat Hillary Clinton conceded the U.S. presidential election Wednesday to Republican Donald Trump, saying she hopes he "will be a successful president for all Americans."
But Clinton, a former U.S. secretary of state who was looking to become the country's first female president, acknowledged the depth of her disappointment in losing. She told cheering supporters in New York, "This is painful and it will be for a long time."
WATCH: Hillary Clinton on "painful" election loss
She said the country was "more deeply divided than we thought," but she said the losing Democrats "owe him an open mind and a chance to lead." Clinton urged her supporters to "please never stop believing that fighting for what's right is worth it."
Obama reacts to election results
U.S. President Barack Obama campaigned hard for Clinton's election, but at the White House he said of Trump, "We are now all rooting for his success in uniting and leading the country."
Obama said that despite the rancor of the long campaign and deep political divide in the U.S., "We are all Americans first." He invited Trump to the White House on Thursday to discuss his transition to power on January 20.
WATCH: Obama on peaceful transition of power
Obama congratulated Trump over the phone early Wednesday.
Hours after his election triumph, Trump vowed to never forget the working class Americans who launched him to the biggest upset win in American political history.
"The forgotten man and woman will never be forgotten again," the Republican Trump said on his Twitter account hours after winning the presidency over Clinton. " We will all come together as never before."
When he takes office January 20, Trump, a blunt-spoken billionaire real estate mogul, will become the first U.S. commander in chief who has never before been elected to public office, served in the military or in a high-level government position. At 70, he also will be the oldest U.S. president as he takes over the White House for a four-year term.
He was widely underestimated and even mocked by the political and media class throughout his campaign, but he pulled off a stunning and decisive win over Clinton, who was looking to become the country's first female president. She called Trump to congratulate him in the early hours of Wednesday after the outcome became apparent and planned to talk about it later.
"I pledge to every citizen of our land to be a president for all Americans," said an exuberant Trump, surrounded by his family and top aides at a victory party in New York.
WATCH: Trump promises to be president of all Americans
It was an improbable victory for Trump, who right up to Election Day narrowly trailed Clinton in pre-election surveys, most of which proved to be massively wrong in predicting a Clinton win.
Trump's campaign manager, Kellyanne Conway, told television interviewers Wednesday that Clinton had more campaign money, but that his campaign "outworked them, and frankly, we outsmarted them and outclassed them in some cases."
"Take it to the bank, candidates matter," Conway said. "There's no substitute for a great candidate."
Trump's victory brought to an end one of the most contentious and divisive presidential campaigns ever. At rally after rally, both Clinton and Trump routinely derided each other as unfit to become the country's leader.
Trump captured at least 279 electoral votes compared to just 228 for Clinton, according to figures early Wednesday, amassing more than the 270 majority in the 538-vote Electoral College, where U.S. presidential elections are decided based on the election results in each of the 50 states and the national capital, Washington. Results in a few states were still unclear but won't change the outcome.
Despite his strong electoral vote win, Trump appeared to be headed for a narrow loss in the popular vote.
It would be just the fourth time in U.S. history that the presidential winner has lost the national vote, but the second time in 16 years it has occurred, with a Republican winning both times.
At Trump headquarters the scene was jubilant, though remnants of a divisive campaign were still evident. Even as it became clear that Trump would win, his supporters repeatedly broke out in chants of "lock her up," referring to the Democratic nominee's controversial handling of national security material on her email accounts while she was the country's top diplomat during Obama's first term in the White House.
Trump had vowed during the campaign to name a special prosecutor to further investigate Clinton, but Trump campaign manager Conway said Wednesday, "We have not discussed that at all."
Stock exchanges in Asia and Europe fell on news of the unexpected Trump victory, but recovered somewhat from their lowest points as U.S. vote counts through Tuesday evening showed the increasing likelihood that he would win.
Trump had for weeks shrugged off the significance of opinion polls, saying they were products of a system that was "rigged" against him and insisting that the size and passion of his rallies were a better indicator of public sentiment.
According to exit polls, Trump benefited from a larger than expected turnout among his base of white rural voters, men and those without a college degree. Many of them feel left behind in a changing, global economy and were attracted to Trump's anti-trade, anti-immigration stances, such as his vow to build a wall along the U.S. southern border with Mexico and attempt to make Mexico City pay for it to thwart more illegal immigration into the U.S.
In the end, that was enough to offset Trump's lack of support among minorities, women and more educated voters who favored Clinton. Exit polls showed that nearly 9 in 10 African Americans and two-thirds of Hispanics voted for Clinton.
Republicans control congress
Trump will take office with a Congress fully under control by Republicans, after the party on Tuesday not only protected its majority in the Senate, but also left it in control of the House. That means Republicans will be able to fill vacancies at the Supreme Court, likely resulting in a shift to the right that could last a generation.
But still, the Republican Party faces massive challenges, having been largely divided over Trump's candidacy. Over the course of his campaign, Trump has lashed out at mainstream Republicans, and has rejected many aspects of traditional conservatism.
"We're in unchartered waters now in terms of what comes next," says Republican political strategist Ron Bonjean. "This is an unprecedented victory by an outsider who took control of the Republican Party and shook the establishment to its core and is now coming to Washington with a wrecking ball."
In Photos: Republicans, Democrats React to Vote