WASHINGTON - Seeking to regain lost ground after a weak performance in the first presidential debate, President Barack Obama lashed into Mitt Romney on Tuesday over the Republican’s criticism of his handling of a deadly attack on the US diplomatic mission in Libya.

In one of the tensest moments of their second debate, Obama fought back against his rival’s accusations that he had played down the September 11 assault by militants in Benghazi that killed the US ambassador and three other Americans.

It was as if a different, highly charged president had taken the stage rather than the reluctant, disengaged-seeming candidate who showed up to meet Mr Romney at their first debate two weeks ago.

The Libyan attack the only foreign policy topic discussed in some detail during the 90-minute debate, which was mostly on domestic issues.

President Obama, who concluded that he was ‘too polite’ in his first debate with Romney, made sure no one would say that after their second. He interrupted, he scolded, he filibustered, he shook his head.

He tried to talk right over Romney, who tried to talk over him back. The president who waited patiently for his turn last time around forced his way into Mr Romney’s time this time. At one point, he squared off with Romney face to face, almost chest to chest, in the middle of the stage.

The exchange came near the end of a debate dominated mostly by arguments over the economy, jobs and taxes, considered voters’ main concerns in the November 6 election.

Romney and his aides have sought to use the Benghazi incident - as well as anti-American unrest in other parts of the Arab world - to dent Obama’s national security credentials and accuse him of pursuing a failed Middle East policy.

But Obama came out swinging in their second debate at Hofstra University in Hempstead, New York, accusing Romney of exploiting the Benghazi attack in an effort to score ‘offensive’ political points.

“While we were still dealing with our diplomats being threatened, Governor Romney put out a press release, trying to make political points, and that’s not how a commander-in-chief operates,” Obama said, referring to the Republican’s initial criticism of the administration’s response before the full extent of the bloodshed was known.

Obama and Romney argued testily in front of a group of undecided voters over whether Obama had come out fast enough in describing the Libya attack as terrorism, and the president appeared to get the better of his opponent.

“I stood in the Rose Garden and I told the American people and the world that we are going to find out exactly what happened, that this was an act of terror,” Obama said.

Romney was incredulous. He challenged Obama’s assertion, apparently unaware of Obama’s remarks the morning after the Benghazi attack. “Get the transcript,” Obama told Romney in the closest thing to a smack-down moment in the 90-minute debate.

“He did, in fact, sir,” moderator Candy Crowley said, siding with Obama. “He did call it an act of terror.”

A transcript of the Rose Garden appearance that day shows Obama said: “...no acts of terror will ever shake the resolve of this great nation.”

But despite that comment, some of Obama’s top aides had initially attributed the Benghazi violence to protests over an anti-Islam film and said it was not premeditated, before finally acknowledging much later that it was a terrorist attack.

And Obama, in a September 24 taping of an appearance on ABC, also seemed to hedge when he was asked whether Benghazi was an act of terrorism. He said it ‘wasn’t just a mob action’ but pointed to an ongoing investigation.

Obama said for the first time on Tuesday he was ‘ultimately responsible’ for the safety and security of the Americans killed in the attack. “I’m the president and I’m always responsible,” he said.

Seeking to recover from his apparent misstep, Romney pointed to the administration’s shifting explanations of the events in Benghazi, suggesting it had been an attempt to mislead. “It took them a long time to say this was a terrorist act by a terrorist group,” he said.

Polls have shown national security a strong point for Obama with voters, especially after the killing of Osama bin Laden.

Going on the offensive, Obama sought to depict Romney, who has little foreign policy experience and has stumbled during his occasional forays on the world stage, as ill-prepared to take on the role of commander-in-chief in a dangerous world.

Romney fired back, saying the Benghazi incident “calls into question the president’s whole policy in the Middle East.”

“Look what’s happening in Syria, in Egypt, now in Libya. Consider the distance between ourselves and Israel,” Romney said. “We have Iran four years closer to a nuclear bomb.”

A CNN/ORC International poll indicated that 46 per cent of respondents who watched the debate thought Obama won, compared to 39% for Romney. The result was within the survey’s margin of error, and responses to other questions showed the overall impression was generally positive for both candidates.

After the first debate on October 3 in Denver, a similar poll showed Romney scored a solid victory in the eyes of more than 60% of respondents.

“Most improved - that award goes to Barack Obama,” CNN Senior Political Analyst David Gergen said, comparing the president’s performance on Tuesday to his previous showing. “I think he had a much stronger debate tonight.”

Daily Beast’s Andrew Sullivan, who called Obama’s poll numbers after the first debate “devastating,” predicted the president would come “kicking back in the polls” in coming days.