As President Obama celebrates the signature national-security success of his tenure, he has a long list of people to thank. On the list: George W. Bush.

After the Sept. 11, 2001, attacks, Bush waged wars in Afghanistan and Iraq that have forged a military so skilled that it carried out a complicated covert raid with only a minor complication. Public tolerance for military operations over the past decade has shifted to the degree that a mission carried out deep inside a sovereign country has raised little domestic protest.

And a detention and interrogation system that Obama once condemned as contrary to American values produced one early lead that, years later, brought U.S. forces to the high-walled compound in Abbottabad, Pakistan, and a fatal encounter with an unarmed Osama bin Laden.

But the bridge connecting the two administrations has also led Obama to the same contested legal terrain over how to fight against stateless enemies and whether values should be sacrificed in the pursuit of security.

“We in the Obama administration absolutely benefitted from an enormous body of work and effort that went into understanding al-Qaeda and pursuing bin Laden,” said Ben Rhodes, the deputy national security adviser for strategic communications.

“There’s also a broader set of legal questions that we’ve been wrestling with, and some have not been resolved,” Rhodes said, such as the closing of the military brig at Guantanamo Bay, Cuba, where some of the al-Qaeda leaders who provided the early clues that led to bin Laden’s hideout were held. “The reason is that there’s is no consensus in this country for how to do so.”

Obama invited Bush to join him Thursday at the former site of the World Trade Center in Lower Manhattan, where the president plans to lay a wreath and meet with families of those who lost relatives in the attacks. Bush declined the invitation.

Obama campaigned against the ends-justify-the-means legal system adopted by the Bush administration to capture, detain, question and try terrorist suspects, including those at the center of bin Laden’s pursuit.

After pledging to close Guantanamo within a year of taking office, Obama has failed to do so, and he has chosen to alter, rather than scrap, the Bush-era military commission system to try terrorist suspects. Human rights groups have called the changes improvements.

Obama has abolished the use of harsh interrogation techniques, which some Bush administration officials say produced essential intelligence in the hunt for bin Laden.

As former defense secretary Donald H. Rumsfeld told Sean Hannity on Tuesday, “I think that anyone who suggests the enhanced techniques, let’s be blunt, waterboarding, did not produce an enormous amount of valuable intelligence just isn’t facing the truth.”

Benjamin Wittes, the research director in public law at the Brookings Institution, said that “the executive branch does not fundamentally alter its nature when a presidency changes.”

“It’s very easy to focus on changes in interrogation guidance or standing detention authority,” Wittes said. “But the truth is three successive administrations have really made a priority out of capturing, finding and killing Osama bin Laden, and there’s a lot of continuity in that.”

The existence of the courier who helped lead U.S. intelligence officials to bin Laden’s compound surfaced within the CIA’s secret prison system as early as 2002. It came from al-Qaeda operatives held there.

Some, including Khalid Sheikh Mohammed, were subjected to harsh interrogation techniques, including the simulated drowning known as waterboarding, although it is not known whether the courier, whose nom de guerre was Abu Ahmed al-Kuwaiti, surfaced as a direct result of those sessions.

Four years later, after Bush banned waterboarding and closed the CIA black sites, detainee interrogations revealed the courier’s importance and led interrogators to think he might still be in contact with bin Laden.

It is unclear whether that information emerged under duress, but White House officials say it was only one piece of a vast intelligence effort that included surveillance, eavesdropping and other time-tested techniques.

As Sen. Dianne Feinstein (D-Calif.), chairman of the Senate Intelligence Committee, put it: “A piece here, a piece there, all put together.”

But Porter Goss, a former CIA director during the Bush administration, said, “A great percentage of what we know about al-Qaeda and the players comes out of the interrogation program.”

“It’s a continuum and an ever-growing story. The more we found out, the more we knew,” he said. “If you ask me which particular ingredient we could have done without, that’s impossible. That’s a fool’s gold chase.”

Before taking office, Obama outlined what he intended to do to change the course of the war against al-Qaeda and its affiliates, especially in Afghanistan and Pakistan, perhaps its main front.

In a July 2008 speech in Washington, Obama, then the presumptive Democratic nominee, said, “We need more troops, more helicopters, more satellites, more Predator drones in the Afghan border region,” all of which he has done.

“And we must make it clear that if Pakistan cannot or will not act, we will take out high-level terrorist targets like bin Laden if we have them in our sights,” he said.

In recent days, though, Pakistani officials have suggested the operation was illegal, calling it a “unauthorized unilateral action.”

The administration did not seek Pakistan’s permission, fearing bin Laden would be tipped off, and hours after the raid, a senior administration official told reporters, “The United States had a legal and moral obligation to act on the information it had.”

But administration officials, including Obama, have made clear in public and in private meetings with Pakistani officials that the United States would pursue such a mission if the opportunity arose. White House press secretary Jay Carney said Wednesday that stance continues to be U.S. policy.

“There is simply no question that this operation was lawful,” Carney said. “We acted in the nation’s self-defense.”

Before dawn Monday in Pakistan, a team of Navy SEALs raided the compound and, after coming under fire, killed bin Laden, his son, Khalid, and two couriers.

Administration officials have revised their original suggestion that bin Laden may have been armed, saying Tuesday that he did not have a gun.

Carney told reporters Tuesday that “resistance does not require a firearm,” a point echoed by several legal analysts.

“Certainly it would be a violation of international law to shoot someone who is trying to surrender,” said John Bellinger III, who served as legal adviser to the National Security Council and the State Department during the George W. Bush administration.

“On the other hand, just because someone is unarmed doesn’t mean that they don’t pose a threat and that the use of force is inappropriate,” he said. “It’s essentially up to the judgment of the soldiers on the ground as to whether they feel they are facing an imminent threat and can use force.”

Capturing bin Laden would have posed its own set of challenges for Obama, who would have been forced to decide where to detain him and how to try him.

His death spared Obama from having to make those decisions, even though administration officials insist that the Navy SEALs were under no order to kill him.

“I think it’s entirely appropriate that, given the circumstances, that he was brought to justice in the way that he was,” Carney said.