With its temperate climate and bucolic hills, this town has long been a refuge for tourists and the wealthy. It has also been a hub for Pakistan’s powerful military, which trains and bases troops here.

And so it was both surprising and befuddling to many residents that Osama bin Laden, the world’s most wanted man, was killed not in a mountainside cave, but in a fiery helicopter raid in an Abbottabad neighborhood densely populated by military families.

The area, a modern development known as Bilal Town, is adjacent to the elite Pakistan Military Academy, where Pakistan’s army chief asserted last week that his troops had “broken the back” of Islamist insurgents in the country. But nearby, at the end of a dirt road, bin Laden was hiding in a massive and heavily fortified compound.

Senior White House officials said Monday that bin Laden was traced several months ago to the three-story house, which one official described as “extraordinarily unique.” It was eight times larger than nearby houses, roomy enough for the relatives that American officials believed bin Laden had with him. Its walls were 12- to 18-feet high and topped with barbed wire. It was built in 2005 and worth $1 million, but it had no Internet or telephone connection.

And unlike their neighbors, officials said, the compound’s residents burned their trash — something even Asghar Marwat, a neighbor, found odd.

“They had not thrown the house waste or garbage to the street, but instead disposed of it inside the house. This was also suspicious,” Marwat, a 38-year-old trader, said Monday. “Now this secret is open, that they were long in association with Osama. This is really shocking news for everyone.”

There was conflicting information about the occupants of the house. Marwat said two brothers from the nearby Swat Valley, where the Pakistani army fought back Taliban insurgents two years ago, built and lived in the house, but that he knew little else about them. Other residents also said they believed the house was owned by Swat natives, many of whom have moved to Bilal Town. But another Abbottabad resident said the people living in the house were from South Waziristan, a tribal area, and that some occupants seemed to be Arabs.

Abbottabad, about 65 miles from the capital city Islamabad, has been a garrison town since the British era, and its wide streets still give it a colonial feel. Two Pakistani infantry regiments are based there, and it is known for its high-quality schools and medical facilities.

Though it lies inside the Pashtun-dominant province of Khyber-Pakhtunkhwa, Abbottabad is also the main settlement of Pakistan’s Hindko-speaking Hazara minority, whose leaders have argued that they deserve a province of their own.

But Abbottabad has also attracted many refugees from recent Pakistani counterinsurgency offensives in the western tribal areas and Swat, as well as from Afghanistan. They have made the city a linguistic and ethnic patchwork — and probably a good place to hide despite the military presence, some here said.

“People don’t really care now to ask who’s there,” said Gohar Ayub Khan, a former foreign minister from the city. “That’s one of the reasons why, possibly, he came in there.”

Earlier this year, Pakistani security officials told the Associated Press that they had arrested Umar Patek, an Indonesian militant with links to al-Qaeda, in Abbottabad. A Pakistani intelligence official said Monday that Abu Faraj al-Libbi, another senior al-Qaeda leader, spent time in the city before his arrest in nearby Mardan in 2005.

Abbottabad is mostly known for being peaceful, but residents said the calm was broken about 1 a.m. Monday. At that time, at least two helicopters began flying over Bilal Town, said Arshad Khan, a contractor who said he lives about 100 yards from the bin Laden compound.

One of the helicopters flashed a light on the compound, and soon a team of paratroopers was lowered, Khan said. The sound of gunshots followed, he said, and later a “huge bang was heard.” Sounds of an intense firefight lasted for more than 45 minutes, and it included blasts that “rocked my bed and windows,” said Marwat, the trader.

“I was not aware what is happening next to my house,” said Khan, 43. “No, no, I was never expecting that Osama bin Laden was killed.”

On Monday, the Pakistan army cordoned off the area surrounding the compound and prevented journalists from approaching it. Residents milled around outside the barriers, marveling at the event that had taken place while some of them slept.

Raja Kamran, one Abbottabad resident, said the operation should serve as a bookend to the unpopular U.S. military presence in Afghanistan and Pakistan.

“The U.S. should now leave us, as it has got its target,” Kamran said.

Khan is a special correspondent. Brulliard reported from Islamabad.