Attorney General Eric H. Holder Jr. testified Thursday for more than four hours on Capitol Hill in a showdown with House Republicans, who threatened to hold him in contempt if he does not quickly turn over more documents on a botched gun operation.

During a morning of partisan theater, the Republicans on the House Oversight and Government Reform Committee criticized Holder’s management style, interrogated him about internal e-mails, and demanded to know what Justice officials knew about “Operation Fast and Furious” and when they knew it. The Democrats, in turn, defended Holder, advocated stronger gun control laws and accused their GOP colleagues of grandstanding.

By midmorning, after several spirited exchanges in the packed hearing room, Holder showed his frustration.

“This has become political,” Holder said, pointing his finger at one of the committee members. “There is no attempt at any cover-up. We have shared huge amounts of information.”

He said the department would continue turning over documents but would not meet the committee’s deadline or hand over material on some internal deliberations.

The hearing is the latest exchange between Justice Department officials and the panel, which launched its inquiry into Fast and Furious early last year. The committee has sought thousands of documents and called department officials to testify at a series of hearings.

Before Thursday’s hearing began, Chairman Darrell Issa (R-Calif.) privately introduced Holder to the whistleblower in the case — John Dodson, an agent with the Phoenix office of the Bureau of Alcohol, Tobacco, Firearms and Explosives. Dodson alerted Congress in December 2010 that agents who were targeting the powerful Sinaloa drug cartel had allowed more than 2,000 guns to flow illegally onto U.S. streets and into Mexico.

Holder shook hands and gave his phone number to Dodson, whose revelations triggered the congressional investigation, a major shake-up at the ATF and the reassignment of its director, the departure of the U.S. attorney in Phoenix and calls for Holder’s resignation.

Holder, who was presenting testimony on Fast and Furious for the sixth time, told the committee that the “flawed” and “stupid” tactics used in the operation and in three earlier gun investigations under the George W. Bush administration would never be used again.

“Allowing guns to ‘walk’ — whether in this administration or the prior one — is wholly unacceptable,” Holder said.

Two AK-47 semiautomatic rifles connected to the operation were found at a crime scene near Nogales, Ariz., where U.S. Customs and Border Protection Agent Brian Terry was fatally shot in December 2010.

Holder called “gun walking” a “misguided effort to stem the alarming number of illegal firearms that are trafficked each year from the United States to Mexico.” As soon as he learned of it, Holder said he banned the tactic and requested an investigation by the department’s inspector general, which has not been completed.

Issa reiterated his demand that the department turn over more documents by Feb. 9. He said the committee will cite Holder for criminal contempt if the material, including internal deliberations, is not produced.

Holder said his department has produced more than 6,400 documents, but does not intend to turn over “deliberative materials” that came after Feb. 4, 2011, when the committee began its review. That, he said, was a long-standing practice that preserves the ability of top officials to communicate confidentially.

“I think you’re hiding behind something here,” said Rep. Dan Burton (R-Ind.). “There’s things you don’t want us to see. You ought to give us the documents.”

Rep. Ann Marie Buerkle (R-N.Y.), who has called for Holder’s resignation, told him, “You’ve denied knowledge of the program and that, accordingly you should not be held accountable. My question to you here today is what more could have possibly gone wrong? . . . How many more Border Patrol agents would have had to die for you to take responsibility?

Earlier this week, the panel’s Democrats released a report that placed the blame for the gun operation on ATF agents and federal prosecutors in Phoenix, saying no evidence existed that Holder or senior Justice officials authorized or knew about the risky tactic.

During the hearing, ranking Democrat Rep. Elijah E.Cummings (Md.) turned to Issa and said, “You now appear intent on escalating controversy and promoting unsubstantiated allegations in a campaign that looks more like an election-year witch hunt than an even-handed investigation.”