Hillary Clinton strove to close the book on the worst episode of her tenure as secretary of state Thursday, battling Republican questions in a marathon hearing that grew contentious but revealed little new about the 2012 attacks in Benghazi, Libya.

She firmly defended her record while seeking to avoid any mishap that might damage her presidential campaign.

Pressed about events before and after the deaths of four Americans, Clinton had confrontational exchanges with several Republican lawmakers but also fielded supportive queries from Democrats.

In the end, there were relatively few questions for the Democratic presidential front-runner about the specific events of Sept. 11, 2012, which Clinton said she continues to lose sleep over.

"I imagine I've thought more about what happened than all of you put together," Clinton said. "I've lost more sleep than all of you put together."

'The purpose of this committee is to prosecute you'

The hearing ended at 9 p.m. ET, some 11 hours after it began, with some of the fiercest arguments of the day as Clinton and the House Benghazi Committee's Republican chairman fought over the private email account she maintained as President Barack Obama's chief diplomat.

"I came here because I said I would," an exhausted Clinton told Rep. Trey Gowdy of South Carolina, her chief interrogator. "I tried to answer your questions. I cannot do any more than that."

Gowdy declared after the end of the session: "We keep going on."

Trey Gowdy

Committee chairman Trey Gowdy, Republican Congressman from South Carolina, started the hearing by questioning why the U.S. was in Libya at all. (Jim Lo Scalzo/EPA)

He portrayed the investigation as a non-partisan, fact-finding exercise although fellow Republicans recently described it as designed to hurt Clinton's presidential bid. Democrats have pointed out that the probe has now cost U.S. taxpayers more than $4.5 million US and, after 17 months, lasted longer than the 1970s Watergate investigation.

House Democrats signalled they may quit the committee after the marathon congressional hearing.

"We have learned absolutely nothing," Rep. Adam Smith, D-Wash., a member of the panel, said.

Other Democrats, who had labelled the probe a partisan effort to undermine Clinton's presidential campaign, echoed Smith's complaint after the former secretary of state finished her testimony. More telling were comments by House Minority Leader Nancy Pelosi, D-Calif., who asked: "What's next? Is this thing forever? Are they ever going to make a decision about whether to continue this?"

Pelosi has insisted, as she reiterated Thursday, "You have to be in the room to defend the truth." With Clinton's testimony concluded, that decision is likely to be revisited. Senior Democratic aides would not rule out the possibility of Democrats boycotting the panel, whose work likely will stretch into the election year.

Rep. Elijah Cummings of Maryland, the committee's top Democrat,, said no decision has been made on whether Democrats boycott investigation.

For Clinton, the political theatre of the hearing offered both opportunity and potential pitfalls. It gave her a high-profile platform to show her self-control and command of foreign policy. But it also left her vulnerable to claims that she helped politicize the Benghazi tragedy.

In one tense moment, Republican Rep. Jim Jordan of Ohio accused her of deliberately misleading the public by linking the Benghazi violence at first to an Internet video insulting the Muslim Prophet Muhammad.

Clinton, stone-faced for much of the hearing, smiled in bemusement as Jordan cut her off from answering. Offered the chance to comment, she said "some" people had wanted to use the video to justify the attack that killed Ambassador Chris Stevens and three other Americans, and that she rejected that justification.

Benghazi News Guide

Chris Stevens was the U.S. ambassador to Libya and was killed along with three other Americans in the attacks on a diplomatic outpost in Benghazi. (Ben Curtis/Associated Press)

The argument went to the origins of the Benghazi saga and how Obama and top aides represented the attack in the final weeks of his re-election campaign. And it reflected the raw emotion the deadly violence still provokes, something Clinton will face over the course of her White House bid even if the Republican-led investigation loses steam.

"There were probably a number of different motivations" for the attack, Clinton said, recalling a time before a clear picture had emerged. Speaking to Jordan, she said: "I'm sorry that it doesn't fit your narrative. I can only tell you what the facts were."

As the hearing neared its conclusion, Republican questions became increasingly aggressive. Rep. Martha Roby of Alabama, however, drew laughter from Clinton by asking if she was alone "the whole night" of the attacks after returning home.

Challenged that she didn't care enough about the victims, Clinton choked up while recounting a conversation with a wounded Benghazi guard. "Please do everything you can so that I can go back in the field," Clinton said he asked her. "I told him I would. He was determined to go back, to protect our diplomats, to protect you when you travel," she said, directing the last part to lawmakers.

Clinton keeps her cool

Clinton made no gaffes. And she never raised her voice in the manner she did at a Senate hearing on Benghazi in January 2013. Then, she shouted: "What difference, at this point, does it make?" Republicans campaigned off that oft-repeated sound bite, and she was careful to avoid leaving a similarly indelible image Thursday.

Gowdy said important questions remain unanswered: Why was the U.S. in Libya, why were security requests denied, why couldn't the military respond quickly on the 11th anniversary of 9/11 and why did the administration change explanations of the attacks in the weeks afterward?

Clinton focused on the bigger picture, starting with a plea for the U.S. to maintain a global leadership role despite threats to its diplomats. She said perfect security can never be achieved, drawing on attacks on U.S. diplomatic and military installations overseas during both Democratic and Republican administrations.

Hillary Clinton on the hot seat4:20

"In Beirut we lost far more Americans, not once but twice within a year," she said of the 1983 attacks in Lebanon that killed more than 250 Americans and dozens of others while Ronald Reagan was president. "People rose above politics. A Democratic Congress worked with a Republican administration to say, `What do we need to learn?"'

At times, Clinton's effort to restrain herself from a fight was apparent, but she gradually joined the fray. She nodded when Democrats fought as her proxies, such as when Cummings described the probe as a partisan campaign replete with implausible conspiracy theories.

The Republican criticism has included contentions by some lawmakers that Clinton personally denied security requests and ordered the U.S. military to "stand down" during the attacks. None of these were substantiated in the independent Accountability Review Board investigation ordered by Clinton after the attacks or seven subsequent congressional investigations.

Thursday's hearing yielded no such evidence, either.

With files from CBC News