Secretary of State Hillary Clinton has angrily defended her handling of the raid on a US consulate in Libya.
At a Senate committee hearing, Mrs Clinton lashed out at a senator who accused the Obama administration of misleading the public.
She took responsibility for security failures that led to the 11 September attack but said she had not seen requests for more security beforehand.
Mrs Clinton is expected to face more heat at a House hearing later.
“Nobody is more committed to getting this right,” Mrs Clinton said, toward the start of what is expected to be her last appearance on Capitol Hill as America’s top diplomat.
“I am determined to leave the state department and our country safer, stronger and more secure,” she added.
She is being questioned about the raid on 11 September last year on the US consulate in Benghazi that left the US envoy to Libya, Christopher Stevens, and three other officials dead.
The ambassador died of smoke inhalation when he was trapped in the burning consulate building, after armed men stormed the compound.
The assault triggered a major political row over who knew what and when.
The incident became an issue in the presidential campaign, and outrage in Congress led the US ambassador to the UN, Susan Rice, to withdraw from the race to succeed Mrs Clinton.
Last November, Ms Rice admitted releasing incorrect information after the Benghazi attack – she said on a Sunday chat show on 16 September that the attack had stemmed from an anti-US protest.
Ms Rice later said there had been no attempt to mislead the public, but Republicans were unconvinced.
At Wednesday’s hearing, Senator Ron Johnson, a Wisconsin Republican, said: “We were misled that there were supposedly protests and then something sprang out of that, an assault sprang out of that.”
Mrs Clinton replied with a raised voice: “But with all due respect, the fact is we had four dead Americans – was it because of a protest, or was it because of guys out for a walk one night who decided they’d go kill some Americans.”
Thumping the table four times, she added: “What difference, at this point, does it make? It is our job to figure out what happened and do everything we can to prevent it from ever happening again, senator.”
In another tense moment, Senator Rand Paul, a Kentucky Republican, said Mrs Clinton’s acknowledgement that she had not read the cables from Libya seeking additional security ahead of the attack was “inexcusable”.
“Had I been president at the time and I found that you did not read the cables,” he said, “I would have relieved you of your post.”
Mrs Clinton told the senators her department was implementing – as well as going above and beyond – 29 recommendations by an independent panel that investigated the incident.
Earlier, Mrs Clinton’s voice cracked with emotion as she described the moment she and President Barack Obama welcomed home the coffins of those killed in the Benghazi attacks.
“I stood next to President Obama as the marines carried those flag-draped caskets off the plane at Andrews,” she 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.”
‘Expanding terrorist haven’
The secretary of state’s appearance comes less than a week after a siege by Islamist militants at a gas facility in Algeria in which three Americans died.
“Instability in Mali has created an expanding safe haven for terrorists who look to extend their influence and plot further attacks of the kind we saw just last week in Algeria,” Mrs Clinton said.
The secretary of state also said there was “no doubt” that the Algerian attackers and remnants of al-Qaeda in Mali had weapons from Libya.
Three state department employees have lost their jobs over the Benghazi attack.
Mrs Clinton, who is stepping down from her post in two weeks, has spent a month recuperating from a series of ailments in December, which delayed her testimony.
She is considered a strong candidate for the Democratic nomination for president should she run in 2016.
Mr Obama has nominated Democratic Senator John Kerry to replace her as Secretary of State.