It is not only New York's early evening theatre-goers who have reason to be thankful for the incompetence of the man who attempted to blow up Times Square. Barack Obama's reputation for being a lucky president has been further enhanced – he might, after all, have been dealing with the horrific aftermath of yet another major terrorist act on American soil. Filled with three propane tanks, gas cans, a gun box, firecrackers and two clocks, the car bomb parked in the heart of the entertainment district at 6.30pm last Saturday was designed to cause carnage.

But in a rerun of the failed al-Qaeda attempt to blow up a London nightclub in the summer of 2007, the bomber's device produced only a tell-tale plume of white smoke. This alerted the city's bomb-disposal teams, which were then able to disarm the apparatus in good time.

The bomber also conveniently left his keys in the ignition, which, with the mobile phone number he kindly provided to the woman who sold him the rusting 1993 Nissan Pathfinder, enabled law-enforcement agencies to have their prime suspect safely locked up just 53 hours and 20 minutes after the vehicle was abandoned.

If nothing else, the arrest of Faisal Shahzad, the 30-year-old Pakistani-American who has been charged with a wide range of terrorist offences and faces life imprisonment without parole if convicted, demonstrates the ability of America's anti-terrorism agencies to deal efficiently and effectively with such threats. Since the events of 9/11, senior national security officials have taken great pride in the fact that they have succeeded in preventing a repeat attack. Last year, astute police work foiled a plot to bomb New York's subway, and planned attacks against a New York synagogue and a Dallas skyscraper have similarly been thwarted.

But the Americans have also had their fair share of lucky escapes, including the attempt last Christmas by Umar Farouk Abdulmutallab, a British-educated Nigerian student, to detonate explosives sewn into his underpants as his flight prepared to land at Detroit. Had Abdulmutallab succeeded, he might have inflicted a mortal wound on Mr Obama's presidency. Jimmy Carter, another idealistic Democrat president, never recovered from the humiliation suffered after Iran's Revolutionary Guards seized the staff of the American embassy in Tehran in late 1979.

Related Articles

At the end of last year Mr Obama's popularity ratings were in free fall, and a terror attack on US soil would probably have ensured he shared with Mr Carter the ignominy of serving only one term in office – particularly as it transpired that Abdulmutallab was known to intelligence officials, and should never have been allowed to board a flight bound for American airspace.

Since then, the passage of the president's health reform legislation, and his recent attacks on Wall Street, have seen his fortunes recover.

But many Americans continue to entertain doubts about their commander-in-chief's ability to defend the country from its enemies. This is partly due to the confused approach Mr Obama has adopted in confronting the threat posed by Islamist extremists. At a time when former inmates of the Guantanamo Bay detention facility have been blamed for establishing a new al-Qaeda infrastructure in Yemen, the Obama administration remains committed to closing the camp – while admitting it has no idea what to do with the remaining inmates.

The decision to try Khalid Sheikh Mohammed, the alleged mastermind of the September 11 attacks, in a Manhattan court as a common criminal has provoked much criticism, with even prominent Democrats arguing that he should be treated as a mass-murdering terrorist, and be tried by a military tribunal. Decisions such as this are prompted primarily by Mr Obama's desire to distance himself from the uncompromising methods adopted by the previous Bush administration. But the attempt to claim the moral high ground has also made him vulnerable to accusations that he is giving terrorists an easy ride.

Dennis Blair, the Director of National Intelligence, publicly criticised the White House for charging Abdulmutallab immediately after his arrest, rather than treating him as an enemy combatant and referring him to America's "High Value Interrogation Group", which specialises in interrogating al-Qaeda terrorists. Similar accusations are being made over the handling of Shahzad, who was charged with terrorism offences within hours of his arrest, thereby limiting the opportunity for counter-terrorism experts to interrogate the al-Qaeda suspect.

Shahzad's case is different, in that, as a naturalised American citizen, he is afforded more rights than a foreign suspect. The emergence of home-grown Islamist terror cells is a relatively new phenomenon, and the authorities will now pay particular attention to the estimated 200,000 Pakistani Americans resident in the country. Critics argue that Shahzad could have provided valuable information about the links between Pakistan-based cells and US-based Islamist militants had he been handled differently.

Mr Obama will insist that his approach is right. But all it would take is one successful al-Qaeda attack for the president to find that his lucky streak had come to an abrupt end.