WASHINGTON (AP) -- America's ugly and unpredictable presidential election barreled toward the finish Tuesday night, with Hillary Clinton and Donald Trump fighting for Florida, North Carolina and Ohio, three of the nation's most competitive states.
Clinton, a fixture in American politics for decades, was hoping to become the first woman to serve as commander in chief. She faced stiff competition from Trump, the billionaire businessman who tapped into a searing strain of economic populism.
The race was expected to be determined by roughly a dozen competitive states. It was too early to call the contests in several where polls had closed: Florida, North Carolina, Ohio, New Hampshire and Pennsylvania.
Vast divides in race and gender were keeping the contest close in Virginia and Georgia, another pair of hard-fought races. About 9 in 10 black voters and two-thirds of Hispanics in each state were backing Clinton, while most whites supported Trump, according to exit polls. Women in both states were far more likely than men to support Clinton.
The winner will inherit a nation angry and distrustful of leaders in Washington. She or he will preside over an improving economy that is nevertheless leaving many behind and a military battling new terror threats. And whoever emerges as the country's 45th president will have to confront head-on a divisiveness that was painfully evident over a two-year race replete with racially loaded rhetoric and unrelenting negativity.
Clinton asked voters to keep the White House in Democratic hands for a third straight term. She cast herself as heir to President Barack Obama's legacy and pledged to make good on his unfinished agenda, including passing immigration legislation, tightening restrictions on guns and tweaking his signature health care law.
"I know how much responsibility goes with this," Clinton said after voting Tuesday at her local polling station in Chappaqua, New York, with her husband, former President Bill Clinton, at her side. "So many people are counting on the outcome of this election, what it means for our country, and I will do the very best I can if I'm fortunate enough to win today."
Trump, the New York real estate developer who lives in a gold-plated Manhattan penthouse, forged a striking connection with white, working-class Americans who feel left behind in the changing economy and diversifying country. He cast immigration, both from Latin America and the Middle East, as the root of many problems plaguing the nation and called for building a wall along the U.S.-Mexico border.
"I see so many hopes and so many dreams out there that didn't happen, that could have happened, with leadership, with proper leadership," he said by telephone on Fox News before casting his own ballot in Manhattan. "And people are hurt so badly."
Seven in 10 Americans who went to the polls Tuesday said immigrants now in the country illegally should be allowed to stay, while just a quarter said they should be deported. More than half oppose building a border wall, according to the exit polls, which were conducted for The Associated Press and television networks by Edison Research.
The Republican Party's tortured relationship with its nominee was evident right up to the end. Former President George W. Bush and wife Laura Bush declined to back Trump, instead selecting "none of the above" when they voted for president, according to spokesman Freddy Ford.
Trump set both parties on edge when he refused to say in the third and final debate whether he would accept the election's results, citing with no evidence the possibility of a rigged outcome. His statement threatened to undermine a fundamental pillar of American democracy and raised the prospect that his fervent supporters would not view Clinton as a legitimate president if she won.
Asked Tuesday in an interview with Fox News if he would accept the election results, Trump continued to demur, saying "We're going to see how things play out."
Most problems that did pop up at polling places Tuesday appeared to be routine - the kinds of snags that come every four years, including long lines, machines not working properly and issues with ballots or voter rolls.
Even before Tuesday, almost 45 million people had cast ballots for president. Many expressed relief the end was in sight after an election season in which personal attacks often drowned out the issues.
Clinton has denounced Trump for calling Mexican immigrants "rapists" and promoting a ban on Muslims entering the U.S., and for his long line of remarks about women that culminated in an audio in which he bragged about grabbing their genitals. Her campaign was hoping high turnout among Hispanics push her over the top in states like Florida and Nevada.
"I grew up in a Hispanic family, and the way that Donald Trump has referred to illegal immigrants - being from illegal immigrants, I took that to heart," said Angel Salazar, a 22-year-old sanitation associate from Oklahoma City. "I don't like anything that he said. I don't like his views. So I voted for Hillary Clinton because she supports us."
Trump called his opponent "Crooked Hillary" for her use of a private email server as secretary of state and her complicated ties to the family's Clinton Foundation.
In the final days, Clinton was buoyed by FBI Director James Comey's weekend declaration that he wouldn't recommend criminal charges against her following a new email review. Comey announced the inquiry late last month, sapping Clinton's surging momentum and threatening Democrats in down-ballot races.
Associated Press writers Catherine Lucey, Bradley Klapper, Vivian Salama, Hope Yen, Jill Colvin and Lisa Lerer and AP Polling Director Emily Swanson contributed to this report.