Secretary of State Hillary Clinton told CNN that she will take the blame for any shortcomings in the handling of an attack last month on the US mission in the Libyan city of Benghazi.

“I take responsibility,” she said, according to the news network, which interviewed her during a visit to the Peruvian capital Lima on Monday.

According to the CNN website, she added that with the US presidential election drawing near, “I want to avoid some kind of political gotcha.”

President Barack Obama has come under fire from his critics over the attack, which left four Americans dead, and Clinton’s move will be seen as an attempt to take the heat off him three weeks before he bids for re-election.

On September 11, heavily-armed militants stormed the consulate compound in Benghazi and attacked an annex housing US personnel, killing the four Americans including the US ambassador to Libya, Chris Stevens.

In the immediate aftermath of the deaths, US administration officials said that it appeared to be linked to protests in the Muslim world against a film shot by US-based activists deemed insulting to the Islamic faith.

But it has since emerged that the prime suspects in the attack, now seen as a deliberate assault, are Islamist militants with links to Al-Qaeda.

State Department officials have testified at a congressional hearing that their requests for additional security in Benghazi were turned down by their superiors within Clinton’s department.

Clinton said that the buck stopped with her on security decisions and played down the significance of the initial communication error, according to CNN, saying there is always “confusion” in the first hours after an attack.

Obama’s Republican rival in the November 6 vote, Mitt Romney, has accused the administration of giving a muddled response betraying a failed Middle East policy, and some of his supporters have gone so far as to allege a cover-up.

The candidates are to meet in a crunch debate on Tuesday, and Clinton’s intervention appears to have been timed to deflect attention from the White House as voting day looms and the polls show the race on a knife edge.