The US presidential candidates had their first face-to-face debate in a 90-minute event that could be crucial in the race for the White House.
Democrat Hillary Clinton and Republican Donald Trump each entered the debate hall at Hofstra University in Hempstead on suburban Long Island within the hour of the debate’s start. Have a read of how they rated here.
The stakes were high as Mrs Clinton and Mr Trump are close in the polls and the debate kicks off the final, six-week sprint of the election.
The two candidates will square off for two more debates next month, while their running mates, Tim Kaine and Mike Pence, are set to meet next week.
The debate was moderated by Lester Holt of NBC News.
Mr Pence, Rudy Giuliani and Don King were among the invited guests in the audience.
The beginning
Former President Bill Clinton and Melania Trump shook hands as they were seated in the front row to watch the debate.
Police on Long Island said about 2,000 protesters gathered outside the debate, including Hardhats for Hillary, socialists and activists calling for a living wage.
Nassau County police said 24 people have been arrested on mostly disorderly conduct charges.
First question: Jobs
Mrs Clinton fielded the first debate question from Mr Holt, who asked about her plan to create better jobs for American workers.
Mrs Clinton, the first woman to participate in a general election debate, first noted that it was her granddaughter Charlotte’s second birthday.
She then launched into her standard campaign promise to fight for fair pay for female workers and to increase taxes on the wealthy.
Mrs Clinton criticised Mr Trump over a loan he got from his father to start his business career, and called his tax cut proposals “Trumped-up trickle-down” economics.
She said Mr Trump “really believes the more you help wealthy people, the better off we’ll be” and criticised her opponent’s aggressive stance on trade, saying the US is “5% of the world population” and that means having to trade with the other 95% of the world.
Mr Trump kicked off the debate by touting his plan to create jobs and claiming that Mexico and other countries are “stealing them”.
He said: “Our jobs are fleeing the country, they’re going to Mexico and many other countries.”
The tycoon said “we have to stop our jobs from being stolen from us”, called for renegotiating US trade deals and claimed job creation will flourish under a Trump administration because of his plans to lower taxes and scale back regulations.
And then taxes…
Mr Trump said his tax plan may benefit the wealthy but it is also “a great thing for the middle class” because companies would invest more in building their businesses.
He said companies want to create jobs but they often move their money overseas because “taxes are so onerous” and the US should cut a deal with them to get them to bring their profits back.
“With a little leadership, you could get it here really quickly,” he said, adding that such a development “would be beautiful”.
Mr Trump said he will release his tax returns if Mrs Clinton publishes the “33,000 emails” she deleted from her private server.
He has refused to release his taxes, saying he is under a routine IRS audit and would do so when it is completed.
The Republican nominee said he would “go against” his lawyer’s wishes and release them before the audit is complete if Mrs Clinton turned over the emails.
Mr Holt noted that, by law, Mr Trump can release his tax returns even while under audit.
Mrs Clinton suggested the celebrity businessman is refusing to release them because he is hiding “something terrible” like a low tax rate or a small amount of charitable contributions.
She said perhaps Mr Trump does not pay any federal income tax at all, noting that some of the Republican nominee’s income tax returns in the 1970s showed he paid no federal income taxes in certain years.
Mrs Clinton also attacked Mr Trump on his business record, saying she is “relieved” her late father never had to work with the billionaire businessman.
She said Mr Trump has “stiffed” thousands of workers and small business owners and he should apologise to them. She added that an architect who designed a clubhouse for one of his golf courses and was not properly paid was in the audience.
Mrs Clinton’s father, Hugh Rodham, was a successful textile merchant. The Democratic presidential nominee said Mr Trump’s business record, including his companies’ multiple bankruptcies, show he would be a poor president.
Mr Trump defended his business prowess, saying many of his ventures had been successful and he has numerous business partners who were happy to work with him.
Race relations
Mrs Clinton said improving race relations comes down to two things – restoring trust between police and communities of colour and reforming gun laws.
She said gun violence is the leading cause of death among young African-American men, and tackling the “plague of gun violence” is critical.
The Democrat said race remains a “significant issue” that too often determines where people live and go to school and how they are treated in the criminal justice system.
Mr Trump talked about the importance of “law and order” in response to the moderator’s question on how to heal racial divides.
He said if we do not have it “we’re not going to have a country” and that in inner cities, African-American and Hispanic communities “are living in hell because it’s so dangerous”.
The Republican said that if you walk down the streets in places like Chicago “you get shot”.
He went on to cite the controversial “stop-and-frisk” policing tactic as a way to bring down crime: “Right now our police are afraid of doing anything.”
A federal judge has ruled “stop-and-frisk” unconstitutional.
Mrs Clinton said that Mr Trump “paints such a dire, negative picture”.
She said those neighbourhoods create businesses and violent crime in them has come down.
To reduce “systemic racism” in the justice system, she favours eliminating mandatory prison sentences and creating more second-chance programmes.
FBI data shows the national violent crime rate peaked in 1991 and has fallen by about half since then.
How to defeat Islamic State?
The Democratic candidate said defeating the Islamic State group and taking out its leaders would be a top priority as president.
Mrs Clinton said she is hopeful that IS would be pushed out of Iraq by the end of the year, and the US could then help its allies “squeeze” the terrorist group in Syria.
She said the US should also be working to disrupt the group’s online propaganda efforts.
Mr Trump said Nato needs to “go into the Middle East with us” to combat IS, and took credit for Nato focusing resources on combating terrorism.
In fact, the alliance agreed in July to contribute aircraft and conduct training in Iraq and has increased intelligence co-ordination there.
And Nato set up an anti-terrorism programme in 2004 – years before Mr Trump criticised the alliance as a presidential candidate.
Earlier this year, Mr Trump criticised Nato for not focusing on terrorism. He said that afterwards, he saw an article reporting that Nato was opening a new, major anti-terrorism division.
He said in the debate that Nato’s action was “largely because of what I was saying, and my criticism of Nato”.
And finally, will you mind if the other wins?
Both candidates concluded the first presidential debate by saying they will accept the outcome if the other wins.
Mrs Clinton spoke directly to viewers and said: “It’s not about us, it’s about you.”
Mr Trump initially dodged the same question, saying he would make a “seriously troubled” America “great again”. He added: “I’m going to be able to do it. I don’t believe Hillary Clinton will.”
But he finished his answer by saying that if Mrs Clinton wins, “I will absolutely support her”.