President Barack Obama meets with members of his national security team to discuss developments in the Boston bombings investigation, in the Situation Room of the White House, April 19, 2013. Pictured, from left, are: FBI Director Robert Mueller; Lisa Monaco, Assistant to the President for Homeland Security and Counterterrorism; Attorney General Eric Holder; Deputy National Security Advisor Tony Blinken; and Vice Persident Joe Biden.

In a landmark foreign policy speech on Thursday, US President Barack Obama outlined the future of American counterterrorism efforts, including new policy guidelines for drone strikes.

During the speech, Obama also called for the closure of the controversial US detention center at Guantanamo Bay, and even took on a defiant protester.

Identified as Code Pink founder Medea Benjamin, the protester repeatedly interrupted the president as he talked about Guantanamo, a topic made more contentious by the fact that Obama campaigned on a promise to close the US-run Cuban detention center, but has so far failed to do so.

"Part of free speech is you being able to speak, but also me being able to speak. And you listening," Obama told Benjamin, prompting applause. Watch his response to her third interruption here:

Speaking at the National Defense University in Washington, DC, Obama announced that he will lift restrictions barring the transfer of Yemeni nationals at Guantanamo back to Yemen. The president added that he hopes to move the rest of the high-value detainees at Guantanamo, many of whom are currently on hunger strike, to prisons on American soil.

Obama addressed recent accusations of government secrecy and acknowledged calls for greater transparency. He outlined various options and vowed to work with lawmakers to establish an independent court of review.

But the drone program, which has drawn criticism for the high civilian casualty rate reported by rights groups and other watchdog organizations, was the focus of Obama's remarks.

Some critics have also raised questions as to the legality of the US drone program abroad, but according to Obama, "America’s actions are legal."

"We were attacked on 9/11," the US president said. "Within a week, Congress overwhelmingly authorized the use of force. Under domestic law, and international law, the United States is at war with al Qaeda, the Taliban, and their associated forces. We are at war with an organization that right now would kill as many Americans as they could if we did not stop them first. So this is a just war — a war waged proportionally, in last resort, and in self-defense."

At the same time, the US leader said he believes Al Qaeda's influence is waning and spoke at length about the nature and scope of the "war on terror," the signature phrase describing American counterterrorism efforts following the 9/11 attacks.

"We must define our effort not as a boundless ‘global war on terror’ — but rather as a series of persistent, targeted efforts to dismantle specific networks of violent extremists that threaten America," Obama said, at that point referring specifically to drone strikes.

The president attributed the extremist threat to a certain world-view, saying, "The terrorism we face is fueled by a common ideology — a belief by some extremists that Islam is in conflict with the United States and the West, and that violence against Western targets, including civilians, is justified in pursuit of a larger cause."

"Of course," he said, "this ideology is based on a lie, for the United States is not at war with Islam; and this ideology is rejected by the vast majority of Muslims, who are the most frequent victims of terrorist acts."

"To say a military tactic is legal, or even effective, is not to say it is wise or moral in every instance," Obama said. "For the same human progress that gives us the technology to strike half a world away also demands the discipline to constrain that power — or risk abusing it."

"That’s why, over the last four years, my Administration has worked vigorously to establish a framework that governs our use of force against terrorists – insisting upon clear guidelines, oversight and accountability that is now codified in Presidential Policy Guidance that I signed yesterday," he said.

Obama's remarks come a day after a formal admission from Attorney General Eric Holder that drones have killed four US citizens, including Yemeni-American cleric Anwar al-Awlaki, in Afghanistan, Iraq and Yemen. Obama defended the move in his speech Thursday, saying al-Awlaki was "continuously trying to kill people."

Controversy over the use of drones, known technically as unmanned aerial vehicles, has been ongoing, and was a flashpoint during confirmation hearings for CIA Director John Brennan in February and March.

Obama had expressed concerns in the past that the US counterterrorism plan was too opaque. Former National Security Council spokesman Tommy Vietor told MSNBC on Wednesday that the president “wants to have a conversation about the way we conduct counterterrorism operations.”