WASHINGTON — Secretary of State Hillary Clinton on Wednesday angrily defended her handling of the Sept. 11 attack on the U.S. mission in the Libyan city of Benghazi and denied any effort to mislead the American people.

The attack by armed militants that killed U.S. Ambassador Christopher Stevens and three other Americans threatens to stain Clinton’s legacy as secretary of state and could cast a longer shadow should she decide to make a White House run in 2016.

By turns emotional and fierce, Clinton choked up at a congressional hearing as she spoke of comforting the victims’ families and grew angry when a Republican senator accused the Obama administration of misleading the country over whether the Benghazi incident stemmed from a protest.

“With all due respect, the fact is that we had four dead Americans,” Clinton shot back as she testified before the Senate Foreign Relations Committee, an appearance delayed more than a month because of her ill health.

“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? What difference, at this point, does it make?” she said, making chopping motions with her hands for emphasis.

Clinton cast the Benghazi incident as part of a long history of such violence as well as the result of instability since the Arab Spring of popular revolutions began in 2011, toppling authoritarian rulers in Tunisia, Egypt, Libya and Yemen.

“Benghazi did not happen in a vacuum,” Clinton said. “The Arab revolutions have scrambled power dynamics and shattered security forces across the region.”

The Benghazi assault occurred the same day that a mob, angered by a California-made video depicting the Prophet Mohammed as a fool, a philanderer and a fraud, attacked the U.S. embassy in Cairo. It was followed by attacks on the U.S. embassies in Tunisia, Yemen and Sudan.

Republicans harshly criticized Clinton, and President Barack Obama’s administration more generally, with Sen. Bob Corker saying the Benghazi attack and the U.S. response displayed “woeful unpreparedness” for the events sweeping the region. Sen. Rand Paul said Clinton should have been fired.

Clinton, echoing comments she first made on Oct. 15, said that “I take responsibility” for the shortcomings in security at the Benghazi mission. She stressed that she had accepted all the recommendations of an independent review panel that investigated the incident and that held lower-level officials responsible.

“Nobody is more committed to getting this right. I am determined to leave the State Department and our country safer, stronger and more secure,” Clinton said.

Militants attacked and overwhelmed the U.S. diplomatic facility in Benghazi, Libya, on Sept. 11 in a sustained assault.

The official U.S. inquiry released on Dec. 18 concluded that “leadership and management failures” in two State Department bureaus led to a security posture “inadequate for Benghazi and grossly inadequate to deal with the attack that took place.”

The unclassified version of the “Accountability Review Board” report also faulted poor coordination and unclear lines of authority in Washington.

Four lower-level officials were placed on administrative leave after the release of the inquiry, which did not find Clinton personally at fault.

A separate Senate committee report said the State Department made a “grievous mistake” in keeping the Benghazi mission open despite inadequate security and increasingly alarming threat assessments in the weeks before the attack.

During a morning Senate hearing and a later session in the U.S. House of Representatives, Republicans and Democrats pointed fingers at each other, with Republicans accusing Clinton’s State Department of mismanagement and Democrats saying Congress had not approved sufficient funds for security.

Clinton is expected to step down in the coming days once her designated successor, Sen. John Kerry, is confirmed by the U.S. Senate.

Originally due to testify on Dec. 20, Clinton had to postpone after she suffered a concussion when she fainted because of dehydration. Doctors later found she had a blood clot in her head and hospitalized her for several days.

Several senators, noting the ferocity of Clinton’s defense, said she appeared to have fully recovered.

While many senators praised her four-year tenure as secretary of state, some Republicans were scathing.

Clinton at one point said that she had not seen requests from U.S. officials in Libya seeking additional security.

“Had I been president at the time and I found that you did not read the cables … I would have relieved you of your post. I think it’s inexcusable,” Paul, a Kentucky Republican, told Clinton.

“It’s wonderful to see you in good health and as combative as ever,” Sen. John McCain, R-Ariz., told Clinton, who responded by laughing. McCain then went on to say that he categorically rejected one of her answers and found others unsatisfactory.

While clouding Clinton’s tenure at the State Department, the controversy over the Benghazi attack also cost Susan Rice, the U.S. ambassador to the United Nations, her chance to succeed Clinton as secretary of state.

Republicans in Congress blasted Rice for her comments five days after the attack in which she said it appeared to be the result of a spontaneous demonstration rather than a planned assault.

Rice, who has said her comments were based on talking points from the U.S. intelligence community, eventually withdrew her name from consideration for the top U.S. diplomatic job.

“We were misled that there were supposedly protests and then something sprang out of that, an assault sprang out of that,” Sen. Ron Johnson, a R-Wisc., told Clinton, referring to Rice’s appearance on Sunday television talk shows.

“People have accused Ambassador Rice and the administration of, you know, misleading Americans,” Clinton said. “Nothing could be further from the truth.”

Earlier in her testimony, Clinton appeared to try to subtly distance herself from Rice’s comments.

“The very next morning, I told the American people that heavily armed militants assaulted our compound, and I vowed to bring them to justice. And I stood with President Obama in the Rose Garden as he spoke of an act of terror,” she said.

Clinton’s voice cracked as she spoke of comforting families who lost loved ones in the attack, the first since 1988 in which a U.S. ambassador was killed.

“For me, this is not just a matter of policy — it’s personal,” Clinton told the panel on what is likely to be the last day that she will testify before Congress before stepping down as secretary of state.

“I stood next to President Obama as the Marines carried those flag-draped caskets off the plane at Andrews,” she added, her voice breaking as she described the ceremony at Andrews Air Force Base in Maryland when the men’s remains were brought home.

“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,” she said.