By ALEXANDRA SEMENOVA

Republican candidate Donald Trump emerged the surprise victor early Wednesday in a stunning and unexpected outcome to a bitterly confrontational presidential race against Democrat Hillary Clinton.

As election night wore on, Trump took one battleground state after another, often overcoming polls that predicted a loss. Florida, Ohio, North Carolina and Pennsylvania all moved into the Republican column — making the 70-year-old New York real estate developer, a political outsider who was often shunned by his own party’s insiders, the 45th president of the United States of America.

Clinton, 69, the  former Secretary of State, senator from New York and first lady during the presidency of her husband Bill Clinton, conceded the race to Trump in a phone call. She received strong support from women, but was defeated in her second attempt to become the first woman president.

It was a grueling, bitter contest.

The 2016 presidential race was the first time Trump ran for political office. Before becoming the Republican nominee, he was best known for his work as a businessman and reality television star. Trump is the chairman and president of the Trump Organization, the holding company for his real-estate projects and other business ventures.

Clinton overcame a challenge in the primaries from Sen. Bernie Sanders of Vermont while Trump triumphed over a large field that was whittled down to include Sen. Ted Cruz of Texas and John Kasich of Ohio. She chosen Sen. Tim Kaine (D-Va.) as her running mate.

The battle for the Republican ticket set the tone for the ominous rhetoric of the election early in the race.

“He’s always calling me Little Marco, and I’ll admit he’s taller than me,” Sen. Marco Rubio of Florida, one of Trump’s opponents, said of Trump in February while campaigning in Virginia. “He’s like 6’2, which is why I don’t understand why his hands are the size of someone who is 5’2.”

Trump used the Republican debate in March to fire back. “He referred to my hands — ‘if they’re small, something else must be small,’” Trump said during the nationally televised event. “I guarantee you there’s no problem.”

Such exchanges helped to set the level of the campaign.

Republicandiscontent with Trump followed quickly.

After endorsing Cruz, former GOP nominee Mitt Romney said, “Today, there is a contest between Trumpism and Republicanism,” in a statement he posted to Facebook. “Through the calculated statements of its leader, Trumpism has become associated with racism, misogyny, bigotry, xenophobia, vulgarity and, most recently, threats and violence. I am repulsed by each and every one of these.”

Trump chose a more traditional Republican, Indiana Gov. Mike Pence,  as his vice-presidential nominee. The Trump campaign was plagued by a series of controversies over the course of the election. He faced allegations of sexual assault and charges that “Trump University” was not legitimate. His accusations against the federal judge handling a fraud lawsuit involving  Trump University, Gonzalo P. Curiel, also led to widespread condemnation. He had said Curiel should step aside because his Mexican ancestry would make it impossible for him to judge the case fairly. He also faced disclosures that he had not paid federal income taxes for many years because of financial losses he declared, and he refused to make public his tax returns.

More controversy ensued after Khizr and Ghazala Khan,the parents of a Muslim soldier slain in the war in Iraq,  appeared at the Democratic National Convention in July and urged Americans not to vote for Trump because of his public call to ban Muslims from entering the country. He responded by disparaging the Gold Star family and refusing to issue an apology.

Members of his own party responded with criticism. “I am appalled that Donald Trump would disparage them and that he had the gall to compare his own sacrifices to those of a Gold Star family,”  Sen. Kelly Ayotte (R-N.H.) said at the time.

Clinton’s reputation was damaged by her use of a private email server during her time as Secretary of State and the resulting FBI investigation of her handling of classified information. This arrangement and emails exchanges between members of her campaign revealed by WikiLeaks led to voters’ distrust. Clinton noted that U.S. intelligence agencies had determined that Russian authorities were responsible for hacking the email of her campaign coordinator, and charged that President Vladimir Putin was trying to steer the election to Trump, who alarmed many people with his praise of Putin. Throughout the campaign, Trump constantly called his opponent “Crooked Hillary,” a title that many Americans adopted. He also called repeatedly for Clinton to be jailed for her carelessness with emails, even after the FBI determined that criminal charges should not be brought.

Clinton was also criticized for her controversial paid speeches, a point Sanders had also pressed in the Democratic primaries. Controversy also swirled around the Clinton Foundation.

In July, Gallup showed in its “Favorable Image of Hillary Clinton by Age” study that Clinton’s favorability rating has spiraled down among voters between 18 and 29, dropping from 47 percent to 31 percent over the year.

October shook the campaigns of both candidates.

A 2005 “Access Hollywood” tape originally uncovered by the Washington Post early last month revealed a lewd exchange between Trump and NBC host Billy Bush, in which the Republican nominee joked about making forced sexual advances against women. The incident became the focus of the second and third debates.

This month the Clinton campaign was also shaken by FBI Director James Comey’s announcement 11 days before Election Day that the FBI re-opened the email investigation after finding messages “pertinent” to the case while looking into former Rep. Anthony Weiner, the estranged husband of Clinton’s chief staffer Huma Abedin, for sending explicit text messages to a 15-year-old girl. Comey announced Nov. 6 the FBI found no evidence of criminality in the new emails.