President Barack Obama's record on terrorism is marked by one big victory and many smaller losses.
First and foremost, he will be remembered as the leader who rid the world of Sept 11 mastermind Osama bin Laden but also the one whose tenure coincided with the rise of the Islamic State in Iraq and Syria (ISIS).
A number of smaller lone-wolf attacks such as the shooting at a nightclub in Orlando, Florida, and at an office party in San Bernadino, California, occurred under his watch.
In an address to the nation on May 1, 2011 - about mid-way though his first term - President Obama announced that the United States had "conducted an operation that killed Osama bin Laden, the leader of Al-Qaeda, and a terrorist who's responsible for the murder of thousands of innocent men, women and children".
Mr Obama called on Americans to think back to the sense of unity that prevailed on Sept 11, when the terrorist attack occurred in New York City. "Today's achievement is a testament to the greatness of our country and the determination of the American people," he said.
He told families who had lost loved ones: "Justice has been done."
However, many of his detractors will remember Mr Obama's decision to draw a "red line" in Syria, and his failure to act after Syrian President Bashar al-Assad's army killed more than 1,400 people with sarin gas in August 2013.
In the end, the US secured an agreement requiring Syria to give up its chemical weapon stockpile, but no attack was carried out.
While the Obama administration defends its use of diplomacy rather than force in dealing with the Syrian regime, many felt it showed a lack of resolve. During last year's election campaign, Mr Donald Trump brought it up as an example of Mr Obama's lack of "courage", calling the episode a national "humiliation".
As for ISIS, critics blame the terrorist group's rise on the withdrawal of US troops from Iraq in 2011, but others say numerous other factors contributed, including the complacency and weakness of the Iraqi army.
While significant progress has been made against ISIS positions - last July, reports said ISIS had lost a quarter of its territory in Syria and Iraq over a period of 18 months and, more recently, extremists were purged from the Syrian city of Aleppo just before Christmas - the battle against the militant group is expected to continue long beyond Mr Obama's term in office.