On 11 September 2001, 2,977 victims died in the United States. This was reported by Qazaqyia.kz citing BBC News.

The first duty of a government, countless leaders over the decades have said, is to safeguard its population. On 11 September 2001 the US manifestly failed to do that. The intelligence was there, yet tragically, nobody joined up the dots in time.

9/11, as the attacks on the US became known, came to define – along with the response – a generation of foreign, security and intelligence policy for the first two decades of this century.

On 11 September 2001, as al-Qaeda's suicide pilots flew those hijacked planes into the World Trade Center, I was just finishing a deployment in our Middle East bureau. As a Palestinian taxi driver drove me through the pine-clad hills west of Jerusalem to Tel Aviv's Ben Gurion airport he suddenly turned up the car's radio. "Something big has happened in America," he said. He wasn't exaggerating. 2,977 victims died that day.

The attacks did not come out of nowhere. The CIA had been aware of the al-Qaeda network and its exiled Saudi leader, Osama Bin Laden, for years prior to 2001. It even had a taskforce dedicated to hunting him down.

Nine days after the 11 September attacks, then US President George W Bush declared the "War on Terror".

In the ensuing 25 years there have been numerous intelligence successes as well as failures on both sides of the Atlantic. The successes include plots that have been foiled, suspects who have been arrested, brought to trial, convicted and jailed.

But what of the bigger picture? How has intelligence-gathering, counter-terrorism and strategic planning changed in the 25 years since the worst terrorist attack in US history?

No one can question that 9/11 was a colossal intelligence failure, or to be more specific, a failure of imagination in the US intelligence community. At the time both the CIA and the FBI were in possession of information which, if shared properly, could have prevented what happened.

The 9/11 Commission Report that followed blamed "failures of imagination, policy, capabilities and management" on the US government. The CIA and FBI, the report concluded, failed to properly assess intelligence and share information with each other and take sufficient steps to disrupt the plot.

This most basic of lessons has since been largely – although not completely – learnt, and sharing between Western intelligence agencies is infinitely better than it was in 2001.

The old rivalries between say, MI5 and Police Counter Terrorism have dissolved, first with regional 'fusion centres' dotted around the UK and now, most recently, with the establishment of the high-security Counter Terrorism Operations Centre in London. Here MI5 intelligence officers might find themselves sitting literally right next to police officers whose job it is to take the executive action to stop a terrorist plot. Equally, they might find themselves sitting next to a US federal agent from the FBI or a language specialist seconded from GCHQ.

Since 9/11, there has also been a root-and-branch reorganisation of US intelligence with the establishment of a National Counter Terrorism Center just outside Washington DC and a Director of National Intelligence to ensure that information is shared where it needs to be between the 18 separate US intelligence agencies. The relationship between the CIA and its UK counterpart, the Secret Intelligence Service (better known as MI6) is perhaps the closest one in the world. This is supplemented by the Five Eyes alliance that pools intelligence between the US, UK, Canada, Australia and New Zealand.

Yet disastrous failures of intelligence, assessment and strategic planning have still occurred since the planes hit the Twin Towers. In the run-up to the US-led invasion of Iraq in 2003, MI6 unwisely allowed its intelligence to be politicised, leading to the organisation suffering its worst reputational setback since the days of betrayal by the double agent Kim Philby and other Soviet moles in the 1950s and 60s.

Against a backdrop of overwhelming political pressure from Washington to produce evidence that Iraq, under its President Saddam Hussein, still possessed Weapons of Mass Destruction (WMDs), MI6 supplied Prime Minister Tony Blair's government with what turned out to be flawed intelligence. Iraq did indeed have WMDs in the past, but it was all destroyed after the 1991 Gulf War.

Following the Iraq invasion of 2003, MI6 then underwent a complete revamp of how it assesses the raw intelligence, known as CX, that comes in from agents in the field. Today there is a clear separation between the agent runners - whose job it is to gather that intelligence from sources in places like Iran, North Korea or from inside proscribed terrorist groups such as al-Qaeda - and the reports team, whose job is to check and challenge that intelligence, often sending it back to demand more substantiation.

"The [2003] Iraq war was based on deeply flawed intelligence," says General Sir Richard Shirreff who served in Iraq as a divisional commander. "Have we learnt from it? No, I think we're bad at learning… It was so obvious as a Commander that we were heading for strategic failure".

After the Iraq invasion an inquiry followed once again, culminating in the Butler Review. This concluded that the UK's intelligence on Iraq's alleged WMD programme "was seriously flawed and heavily reliant on unverified sources".

The Security Service, MI5, has also had its own failures, amid numerous undoubted successes, in foiling terrorist plots. "After 9/11," says Lord Jonathan Evans, who ran MI5 from 2007-2013, "the assessment was that by far the most pressing security thr