Donald Trump has confessed he has regrets from his career as a politician.
He said he wishes he had won the Republican presidential nomination "in a nicer manner", but assured voters that they should not worry about his temperament or judgment as commander in chief.
Mr Trump made the comments during last night's forum on national security at the Intrepid Sea, Air and Space Museum aboard a decommissioned aircraft carrier in New York.
He cited his recent trip to Mexico as an example of his ability to serve as commander in chief.
He noted that the Mexican officials who arranged the trip were forced out of government in recent days. He saw that as a good thing, saying: "That's how well we did."
Meanwhile, Hillary Clinton defended her handling of classified information as secretary of state, insisting she did not jeopardise national security by discussing the Obama administration's drone programme and other sensitive matters on a personal email account.
Ms Clinton also defended her support for US military intervention in Libya, despite the chaos that has consumed that country since then. The Democratic nominee urged voters to weigh her readiness to be president not based on one decision but "on the totality of my record".
The pair spoke back-to-back but not face-to-face at the forum, hosted by NBC.
The candidates also took questions from an audience of veterans and active-duty troops gathered on the decommissioned USS Intrepid.
By virtue of a coin toss, Ms Clinton took the stage first. She quickly faced a barrage of questions about her email use at the State Department, where she used a personal email address and a private server.
The FBI found that some emails sent or received by Ms Clinton contained classified information, but director James Comey did not recommend she face prosecution.
According to notes released from her interview with the FBI, she said she relied on others with knowledge about handling classified files.
She drew an implicit contrast with Mr Trump when asked for the most important quality a commander in chief must possess, replying: "Steadiness, an absolute rock steadiness, mixed with strength to make the hard decisions."
She has spent much of the summer trying to paint Mr Trump as ill-prepared to be commander in chief and too unpredictable to make decisions that put American service members in harm's way.
Her case has been bolstered by numerous Republican national security experts who have spoken out against their party's nominee, including former defence secretary William Cohen, who announced his support for Ms Clinton yesterday.
Ahead of the forum, Mr Trump rolled out a new plan to boost military spending by tens of billions of dollars, including major increases in the number of active troops, fighter planes, navy ships and submarines.
He also said that, if elected, he would give military leaders 30 days to formulate a multi-pronged plan to defeat the so-called 'Islamic State' group.
"This will require military warfare, but also cyberwarfare, financial warfare and ideological warfare," he said during an address in Philadelphia.
A senior adviser said ahead of the speech that Mr Trump would make sure the additional spending was fully paid for but did not explain how.
The US currently spends more than US$600bn a year on the military, more than the next seven countries combined.