After a bitter 18-month-long election that exposed some of the nation’s most painful divisions and shook its democratic institutions, Americans began to cast their ballots for President on Tuesday morning.

Hillary Clinton and Donald Trump have woken up on Election Day, Nov. 8, after whirlwind tours of the nation’s battleground states from Ohio to North Carolina and Nevada, to await the results. By the time they return home to sleep on Tuesday night, one of them will be the President-elect.

Donald Trump arrived in midtown Manhattan just before 11am local time Tuesday, to cast his vote. He was met with both cheers and boos, ABC News reported. Trump bought a cupcake from two children selling bakes goods inside the polling station, telling them “you make a little profit okay?”.

Clinton arrived to vote in Chappaqua, New York, shortly after 8 a.m. local time. She greeted supporters who had come to see her cast her ballot at the Douglas G. Grafflin Elementary School.

Speaking on Fox News’ Fox and Friends Tuesday morning, Trump joked that he has “decided to vote for Trump”. He described the campaign as an “amazing process”, adding: “It’s been a beautiful process, the people of this country are incredible. People say ‘What have you learned?’ That’s what I’ve learned: the people are amazing.”

He added that he is doing well in North Carolina, Florida and New Hampshire. “Ohio is incredible, just a great place,” he said. “We’re going to win Iowa. We’ve had such great experience there. We’re going to win Iowa, Ohio, New Hampshire. Who knows what happens ultimately, but we’re going to win a lot of states.”

Trump got off to a quick, early lead in the popular vote, winning over the voters of three New Hampshire precincts by a 32-25 margin over Clinton. Polls in the tiny New Hampshire towns of Dixville, Hart’s Location and Millsfield opened just after midnight Tuesday and closed as soon as everyone had voted.

Clinton won more votes in Dixville and Hart’s Location, but Trump was the overwhelming favorite in Millsfield, with a 16-4 edge. Libertarian Gary Johnson picked up three votes. Bernie Sanders, John Kasich and 2012 Republican presidential nominee Mitt Romney got write-in votes.

Until the last moment, both candidates urged their supporters to go out and vote. “Years from today, when your kids and grandkids asked what you did in 2016 when everything was on the line, I want you to be able to say you did vote!” Clinton said in Philadelphia on Monday night. “You voted for an inclusive, big-hearted open-minded country.”

“I’m asking you to dream big. It will be the greatest vote you ever cast in your lifetimes,” Trump said in Scranton, Pa., Monday evening. “We’re going to have a great victory tomorrow, folks. They have no idea.”

Clinton’s campaign staff shipped out of their offices in Brooklyn, luggage in hand as they knocked on doors in swing states at a frenetic pace. Trump crisscrossed the country at a relentless pace, holding rallies in deep-blue Michigan and planning events on Election Day. Some 42 million Americans have already voted; by Tuesday night, more people are likely to have voted than in any other election.

As voters headed to the polls, Clinton maintained a slight but firm lead over Trump and an advantage in battleground states. But the outcome of the race was far from assured, and Trump has tightened the gap with Clinton in the past two weeks. Both limped into Election Day, damaged by self-inflicted wounds.

It has been a nasty election. On the morning of Nov. 8, the nation is more divided by race, gender, education class and geography than it has been in recent memory. Trust in public institutions — including the press, Congress and the vote itself — is at a new low, due in large part to the tumult in this year’s election. Clinton and Trump are among the most disliked major-party nominees in history. No matter who wins on Tuesday night, the next President will have a difficult task of healing the country.

The two candidates could not have been more different in tone and style in the final days of the campaign.

Clinton called on the country to reject Trump’s message, saying it was one of fear, division and hate. She surrounded herself with celebrities, calling on the political and musical glitterati for her last few days of campaigning including musicians Jon Bon Jovi, Bruce Springsteen, Jay Z, Beyoncé and Katy Perry; President Obama and First Lady Michelle Obama; and Vermont Senator Bernie Sanders.

On Monday, Clinton rallied in Pittsburgh, Grand Rapids, Philadelphia and Raleigh, maintaining a positive message and calling on her supporters to counter Trump’s message of “anger.”

“Anger is not a plan,” she told supporters in Cleveland at a rally on Sunday with basketball star LeBron James.

“I love our country and believe in our people. My faith in our future has never been stronger,” she said the next day at her marquee rally at Independence Hall in Philadelphia on Monday night. “I regret deeply how angry the tone of the campaign became.”

“It’s not your fault!” an audience member shouted back.

Trump rallied in Sarasota, Fla.; Raleigh, N.C.; Scranton; and Manchester, N.H.; and relentlessly criticized his rival’s use of a private email server, attacked the media and called for a new order in Washington. He called for an end to corruption and promised to bring jobs and wealth “back” to the U.S.

Clinton “should not be allowed to run for President, and she’s being protected by a rigged system,” Trump said on Monday. “Now it’s up to the American people to deliver justice at the ballot box tomorrow. You’ve got to get out and vote. Let’s swamp them.”

The campaigns struggled to accurately read the flurry of early votes, cast in record numbers. Of the more than 42 million early votes cast, Hispanic participation skyrocketed, while votes cast by African Americans declined compared with 2012.

Election Day will be a difficult climb for Trump. He could win all the difficult battleground states of Florida, Ohio, North Carolina, Nevada and New Hampshire and Iowa, and he still would not have the 270 electoral votes he needs to win the presidency. If Clinton wins Florida or Ohio, Trump’s campaign is almost certainly over.

Clinton holds a slight but firm lead over Trump in national polls, leading her Republican opponent by about 3 percentage points, according to polling averages. But the Democratic nominee was up by as many as 7 points just weeks earlier.

The 2016 campaign was remarkable for the velocity and magnitude of scandals. Clinton’s use of a private email server as Secretary of State rocked her campaign from the beginning, raising questions about transparency and her handling of classified information.

But Trump’s virulent nationalism is unprecedented among successful major-party candidates. His repeated bankruptcies and his nonpayment of contractors damaged his credibility as a businessman, and his incendiary proposals about banning Muslims from entering the U.S. and deporting undocumented immigrants damaged him in the general election.

Read More: See Hillary Clinton With Her Biggest Fans: Young Girls

Both candidates withstood a late-breaking wave of surprise revelations. A tape of Trump bragging about sexual assault surfaced in early October, followed by about a dozen accusations from women who said he assaulted them.

The Clinton campaign dealt with a late announcement by FBI Director James Comey announcing the bureau had found additional Clinton emails. (On Sunday, Comey said the FBI had found nothing in the emails to make it revisit its decision not to charge Clinton with a crime.)

All of the controversy made for a disillusioned electorate that was as often voting against the other candidate as for their own team.

Clinton has been running for President for 576 days, and Trump for 511. They both ate pork on a stick at the Iowa State Fair in the summer of 2015, braved the winter primaries in New Hampshire and Michigan, and mocked each other at a glitzy dinner in Manhattan hosted by a local Cardinal.

But their campaign styles were vastly different. Clinton raised $1.3 billion by the middle of October, while Trump raised just $800 million. Clinton relied on a highly sophisticated data and field operation and many millions in campaign advertising, while Trump relied on large rallies, almost no get-out-the-vote operations and campaign aides who were often novices.

Read More: Watch the 10 Most Notable Campaign Ads of 2016

Clinton helped the Democrats raise money at record rates, relying on a new fundraising mechanism in the wake of the Supreme Court’s McCutcheon decision, which allows candidates to raise huge sums for coordinated committees. Trump took advantage of the same rules but with less success.

In the Democratic primary, Clinton faced a surprisingly tough and long-lasting primary challenge from Sanders, who rallied much of the anti-Washington sentiment on the left against her. He took liberal positions calling for free, universal health care and free tuition at public colleges. Sanders ultimately endorsed her after the two hashed out the outlines of the Democratic Party platform.

Trump’s war with the leaders of his party began in the Republican primary. He has insulted them as feckless, know-nothing politicians, including Senator Lindsey Graham (a “disgrace”), Senator John McCain (“a hero because he was captured”), Carly Fiorina (“look at that face”), former Florida governor Jeb Bush (“low-energy”) and House Speaker Paul Ryan (“ineffective”). Then he shocked the party’s Establishment by defeating a deep Republican field.

Read More: Read the 10 Meanest Tweets of the 2016 Election

Clinton has pitched herself as an effective manager in Washington, a “fighter” for children and families, calling herself a “progressive who likes to get things done.” She vowed at the end of her campaign to heal the country’s divides and called for a more tolerant country.

“This election, in many ways, is about what kind of future our country will have,” Clinton said at a black church in Philadelphia the Sunday before Election Day. “It is about choosing hope over fear, unity over division and love over hate.”

Trump aimed his message at working-class voters and rusty factory towns that have fallen upon hard times, promising to bring back jobs and shatter conventions in Washington. His hard-line immigration proposals spoke to a sense of cultural loss in many parts of the country.

And on the last day of his campaign, Trump began like he started: reveling in his crowds and relishing the attention. “Look at these people and look at this enthusiasm,” Trump said in Scranton. “There’s nothing like it.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.