A fiery Secretary of State Hillary Clinton on Wednesday angrily dismissed Republican charges of a cover-up over the deadly Benghazi attack and warned the world needs to combat rising extremism.

Combative and at times emotional, Clinton gave no ground to congressional critics still seeking to determine why the administration at first blamed the September 11 assault on a protest outside the US mission in eastern Libya.

“With all due respect, the fact is, we had four dead Americans. Was it because of a protest or because of guys out for a walk one night and [who] decided to go kill some Americans?” she told a tense Senate hearing.

“What difference does it make?” she demanded, thumping her fist on the table as Senator Ron Johnson repeatedly asked her why the administration had initially linked the attack to protests against an anti-Islam Internet video.

“It is our job to figure out what happened and do everything we can to prevent it from ever happening again, senator,” she said.

Later, there were also testy exchanges before a House committee, when Representative Jeff Duncan told Clinton: “Madam Secretary, you let the consulate become a death trap. And that’s national security malpractice.”

Clinton replied she had come to give an “open, transparent presentation” and could have just kept the findings of an inquiry classified and “then, you know, just said goodbye. That’s not who I am. That’s not what I do.”

Her more than five hours of testimony came on the eve of Thursday’s Senate hearing to confirm her successor, John Kerry, who is expected to be easily voted in and could take over within days.

Clinton insisted there was no administration cover-up of the events, when dozens of heavily-armed al-Qaeda-linked militants overran the compound and a nearby CIA-run annex, setting off an eight-hour firefight in which four people, including US ambassador Chris Stevens, were killed.

“Nothing could be further from the truth,” Clinton insisted, stressing that in the days afterwards the administration did not have “a clear picture yet.”

In one of her last major appearances before stepping down at the end of the month, Clinton showed no signs of the ill-health which plagued her in December.

But she choked back a sob as she described having to call the families with the news that Stevens, and information manager Sean Smith, had been killed.

“This is not just a matter of policy. It’s personal. I stood next to President Obama as the Marines carried those flag-draped caskets off the plane at Andrews” air force base, Clinton said.

“I put my arms around the mothers and fathers, the sisters and brothers, the sons and daughters, and the wives left alone to raise their children.”

And she urged senators to learn from the attack as they confront a rapidly evolving political landscape in the wake of the Arab Spring.

“Benghazi didn’t happen in a vacuum,” Clinton told the Senate Foreign Relations Committee, warning of the dangers of al-Qaeda and its sympathisers.

“We have to recognise this is a global movement. We can kill leaders, but until we help establish strong democratic institutions, until we do a better job communicating our values and building relationships, we’re going to be faced with this level of instability.”

But top Republican senators rejected her explanations, with Senator Rand Paul suggesting she should have been fired for not reading requests for additional security.

“Had I been president at the time and I found that you did not read the cables from Benghazi, you did not read the cables from Ambassador Stevens, I would have relieved you of your post. I think it’s inexcusable,” he said.

Senator John McCain also “categorically” rejected some answers, saying four months on, the American public still did not have “basic information.”

“The answers, frankly, that you’ve given this morning are not satisfactory to me,” he told Clinton, adding he still wanted to know why US ambassador to the United Nations Susan Rice said days after the attack that it was triggered by a spontaneous protest outside the mission.

Appearing first before the Senate panel and then before the House Foreign Affairs Committee, Clinton reiterated that she took full responsibility for deficiencies at the mission and insisted she had taken steps to boost security in high-threat regions.

The FBI was also “following some very promising leads” as they investigate exactly who was behind the Benghazi attack, she said, warning that “no one should doubt” President Barack Obama’s promise that America would respond.

But Clinton stressed that Congress ultimately had the power to better fund security, highlighting how the State Department’s last year budget for diplomatic security was US$340 million - or 10 per cent - less than requested.

She had been initially set to testify in December but was forced to send two deputy secretaries after falling ill with a stomach bug, which led to a concussion and a blood clot.