The trail that led the CIA to Osama bin Laden began with his most trusted courier. It had taken the CIA years to discover first his name and then the home where he was hiding the al-Qaida leader. But it took only 40 minutes on Sunday for US special forces to kill both the courier and Bin Laden.

Contrary to repeated speculation over the past decade that Bin Laden was living in one of the remote tribal areas of Pakistan or even across the border in Afghanistan, the al-Qaida leader was found in an affluent suburb of Pakistan's capital, Islamabad.

Senior US administration officials, briefing journalists in a late-night teleconference, said that after 9/11 the CIA chased various leads about Bin Laden's inner circle, in particular his couriers. One of these couriers came in for special attention, mentioned by detainees at Guantánamo Bay by his nom de guerre. He was said to be a protege of Khalid Sheikh Mohammed, the 9/11 mastermind, and one of the few couriers Bin Laden trusted.

Officials said they were initially unable to identify him but finally did so four years ago. They did not disclose his name to reporters on Sunday.

Two years ago, the CIA found the rough location where the courier and his brother lived in Pakistan, and on August last year they narrowed it down to a compound in Abbottabad, an affluent area about 35 miles north of Islamabad that had been founded as a British garrison town in the 1840s and named after its first deputy commissioner, Major James Abbott.

They realised immediately this was no normal residence. The walls of the 3,000 sq ft compound were 12-18ft high, topped with barbed wire. There were two security gates, and access to the compound was severely restricted. The main part of the residence was three storeys high but had few windows, and a third-floor terrace was shielded by a privacy wall. Built around five years ago, it was valued at about $1m but had no phone or internet connection.

The two brothers had no known source of income, adding to CIA suspicions. The CIA learned too that there was a family living with them, and that the composition of this family matched Bin Laden's.

Local suspicions were understood to have been aroused by the fact that the residents of the compound burned their rubbish rather than putting it out for collection. Salman Riaz, a film actor, said that five months ago he and a crew tried to do some filming next to the house, but were told to stop by two men who came out. "They told me that this is haram (forbidden) in Islam," he said. He did not know that he had stumbled across a bespoke terrorist hideaway "custom-built to hide someone of significance", according to a US official.

By September, the CIA had determined there was a "strong possibility" that the hideout was Bin Laden's, and by February, they were confident they had the right location. In March Barack Obama began chairing a series of five national security meetings. At the last of these, on Friday 29 April, while the world's attention was on the royal wedding taking place in London, he gave the order to mount an operation.

At that meeting, at 8.20am in the diplomatic room at the White House, Obama met his national security adviser Thomas Donilon, counter-terrorism adviser John O Brennan, and other senior national security aides to go through the detailed plan to attack the compound and sign the formal orders authorising it, the New York Times reported.

"We shared our intelligence on this compound with no other country, including Pakistan," a senior administration official told the paper. Only a tiny handful of people within the administration were aware of the operation.

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

At around 1.15am local time on Monday, Abbottabad residents became aware that something was happening. "Helicopter hovering above Abbottabad at 1am (is a rare event)," tweeted one local, Sohaib Athar (@ReallyVirtual); following that some minutes later by: "A huge window shaking bang here in Abbottabad Cantt. I hope its not the start of something nasty :-S"

In fact there were four US military helicopters, carrying elite troops from Navy Seal Team Six, a top counter-terrorism unit, US officials told the Associated Press, under the direct command of the CIA director, Leon Panetta, whose analysts monitored the compound from his conference room, which was transformed into a command centre.

One Pakistani official said the helicopters had taken off from the Ghazi airbase in the north-west of the country. Fighters on the roof opened fire on the choppers with rocket-propelled grenades as they came close to the building, according witnesses and Pakistani sources, and one of the helicopters crashed due to mechanical problems. Witnesses reported hearing two small blasts followed by a huge explosion.

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

The details of the operation, including the number of US military personnel involved, remain unclear. Senior administration officials will only say that Bin Laden "resisted" during a gun battle. He died from a bullet to the head, they said.

Bin Laden was identified by facial recognition, one official said, declining to say whether DNA analysis had also been used.

The al-Qaida courier, his brother and one of Bin Laden's sons, whom officials did not name, were also killed. One of Bin Laden's sons, Hamza, is a senior member of al-Qaida. The officials said one woman died when she was used as a shield by a male combatant, and two other women were injured.

Other unidentified males were taken from the scene, a Pakistani official told the Associated Press, while four children and two women were arrested and left in an ambulance, the official said.

The operation took 40 minutes in total, after which flames were visible on the roof of the building. Before withdrawing, US forces blew up the helicopter wreckage. "The aircraft was destroyed by the crew, and the assault force and crew members boarded the remaining aircraft to exit the compound," a senior administration source told the New York Times. "All non-combatants were moved safely away from the compound before the detonation."

Bin Laden's body was loaded on to one of the helicopters and taken from the scene. US officials later confirmed he had been buried at sea, mindful of the Islamic imperative for a speedy burial. The location was not revealed. "We don't want a bunch of people going to the shrine forever," an official told the Washington Post.

It was mid-afternoon at CIA headquarters when Panetta and his team received word that Bin Laden was dead, the Associated Press reported, after which cheers and applause broke out across the conference room.

Informed immediately of the developments, Obama spoke on Sunday night to former presidents George Bush and Bill Clinton. Keith Urbahn, the former chief of staff to Bush's defence secretary Donald Rumsfeld, gave the first public indication of the news, tweeting at 10.25pm EST Sunday evening (3.25am BST Monday morning): "So I'm told by a reputable person they have killed Osama Bin Laden. Hot damn."