WASHINGTON — Osama bin Laden, the glowering mastermind behind the Sept. 11, 2001, terror attacks that killed thousands of Americans, was slain in his luxury hideout in Pakistan Sunday in a firefight with U.S. forces, ending a manhunt that spanned a frustrating decade.

“Justice has been done,” President Barack Obama said in a dramatic late-night announcement at the White House.

A jubilant crowd of thousands gathered outside the White House as word spread of bin Laden’s death. Hundreds more sang and waved American flags at Ground Zero in New York — where the twin towers that once stood as symbols of American economic power were brought down by bin Laden’s hijackers 10 years ago.

Another hijacked plane slammed into the Pentagon on that cloudless day, and a fourth was commandeered by passengers who forced it to the ground — at cost of their own lives — before it could reach its intended target in Washington.

The United States attacked Afghanistan within months, pursuing al-Qaida, and an invasion of Iraq followed as part of the Bush administration’s global war on terror.

U.S. officials said the CIA tracked bin Laden to his location, then elite troops from Navy SEAL Team Six, a top military counter-terrorism unit, flew to the hideout in four helicopters. Bin Laden was shot in the head in an ensuing firefight, these officials said, adding that he and his guards had resisted his attackers. U.S. personnel identified him by facial recognition, the official said, declining to say whether DNA analysis had also been used.

The U.S. team took custody of bin Laden’s remains, which American officials said were being handled in accordance with Islamic tradition. Obama said neither Americans nor civilians were harmed in the operation.

Three adult males were also killed in Sunday’s raid, including one of bin Laden’s sons, whom officials did not name. One of bin Laden’s sons, Hamza, is a senior member of al-Qaida.

Bin Laden’s death marks a psychological triumph in a long struggle that began with the Sept. 11, 2001 attacks, and seems certain to give Obama a political lift. But its ultimate impact on al-Qaida is less clear.

The greatest terrorist threat to the U.S. is now considered to be the al-Qaida franchise in Yemen, far from al-Qaida’s core in Pakistan. The Yemen branch almost took down a U.S.-bound airliner on Christmas 2009 and nearly detonated explosives aboard two U.S. cargo planes last fall. Those operations were carried out without any direct involvement from bin Laden.

Obama provided few details of the operation beyond to say that he had personally ordered it be carried out. Other officials said it was so secretive that no foreign officials were informed in advance, and only a small circle inside the administration was aware of what was unfolding half a world away.

But within hours of the announcement, Pakistani officials and a witness said bin Laden’s guards had opened fire from the roof of the building, and one of the choppers crashed. The sound of at least two explosions rocked the small northwestern town of Abbottabad, where the al-Qaida chief made his last stand.

Flames were visible after the attack on the building, which was located about 100 yards from the gates of a Pakistani military academy — certain to raise questions about al-Qaida’s ability to build a custom-made hideout in such close proximity.

Abbottabad, surrounded by hills and with mountains in the distance, is less than half a day’s drive from the border region with Afghanistan, where most intelligence assessments believed bin Laden was holed up.

The White House said Obama convened at least nine meetings with top national security officials in the lead-up to Sunday’s raid.

The president spent part of the day on the golf course, but cut his round short to return to the White House for a meeting where he and top national security aides reviewed final preparations for the raid.

Two hours later, Obama was told that bin Laden had been tentatively identified.

CIA director Leon Panetta was directly in charge of the military team during the operation, according to one official, and when he and his aides received word at agency headquarters that bin Laden had been killed, cheers broke out around the conference room table.

Halfway around the world, in Abbotabad, one witness described a military raid carried out under darkness.

“I heard a thundering sound, followed by heavy firing. Then firing suddenly stopped. Then more thundering, then a big blast,” said Mohammad Haroon Rasheed. “In the morning when we went out to see what happened, some helicopter wreckage was lying in an open field.”

A Pakistani official in the town said fighters on the roof opened fire on the choppers with rocket-propelled grenades. Another official said the four helicopters took off from the Ghazi air base in northwest Pakistan.

The U.S. and Pakistani officials spoke on condition of anonymity because of the sensitivity of the information.

Obama said he gave the order for the operation after receiving intelligence information that he did not further describe.

Former President George W. Bush, who was in office on the day of the attacks, issued a written statement hailing bin Laden’s death as a momentous achievement. “The fight against terror goes on, but tonight America has sent an unmistakable message: No matter how long it takes, justice will be done,” he said.

Senior administration officials said the terrorist mastermind was found inside a custom-built compound with two security gates. They said it appeared to have been constructed to harbor one high-value target and that for undisclosed reasons, officials believed the hideout was bin Laden’s.

The stunning end to the world’s most widely-watched manhunt came just months before the 10th anniversary of the Sept. 11 attacks on the World Trade Centers and Pentagon, orchestrated by al-Qaida, that killed nearly 3,000 people.

The attacks a decade ago seemed to come out of nowhere, even though al-Qaida had previously struck American targets overseas.

The terrorists hijacked planes, flew one of them into one of Manhattan’s Twin Towers — and, moments later, into the other one. Both buildings collapsed, trapping thousands inside and also claiming the lives of firefighters and others who had rushed to help them.

A third plane slammed into the Pentagon, defacing the symbol of America’s military night. Officials have speculated that the fourth plane had been heading for the U.S. Capitol or perhaps even the White House when it crashed in Pennsylvania.

Based on statements given by U.S. detainees, intelligence officials have known for years that bin Laden trusted one al-Qaida courier in particular, and they believed he might be living with him in hiding. In November, intelligence officials found out where he was living, a huge fortified compound in an affluent suburb of Islamabad. It was surrounded by walls as high as 18 feet high, topped with barbed wire. There were two security gates and no phone or Internet running into the house.

Intelligence officials believed the $1 million home was custom-built to harbor a major terrorist. CIA experts analyzed whether it could be anyone else, but time and again, they decided it was almost certainly bin Laden.

Obama spoke with Bush and former President Bill Clinton Sunday night to inform them of the developments.

The president struck a less than boastful tone in his brief announcement, although he said the death of bin Laden was “the most significant achievement to date in our nation’s effort to defeat al-Qaida.

“His death does not mark the end of our effort. There’s no doubt that al-Qaida will continue to pursue attacks against us. We must and we will remain vigilant,” he added.

Moments after Obama spoke, the State Department put U.S. embassies on alert and warned of the heightened possibility for anti-American violence. In a worldwide travel alert, the department said there was an “enhanced potential for anti-American violence given recent counterterrorism activity in Pakistan.”

More in News

SAN JOSE -- Grenades were discovered at an estate sale Monday, prompting the evacuation of about 10 homes near the San Jose Country Club, according to the Santa Clara County Sheriff's Office. Deputies were called to the 300 block of Gordon Avenue, near Greenside Drive, about 4:10 p.m., said Sgt. Rich Glennon. Get breaking news with our free mobile app....