WASHINGTON — Attorney General William P. Barr defended himself on Wednesday against withering criticism of his handling of the special counsel investigation as Democrats accused him of deceiving Congress and acting as a personal agent for President Trump rather than a steward of justice.

At a contentious hearing marked by a deep partisan divide, Mr. Barr denied misrepresenting the investigation’s conclusions despite a newly revealed letter by the special counsel, Robert S. Mueller III, protesting the initial summary of its findings. Mr. Barr dismissed the letter as “a bit snitty” and the controversy over it as “mind-bendingly bizarre.”

But in a series of aggressive interrogations, Democrats on the Senate Judiciary Committee expressed indignation and asserted that the attorney general had been “purposely misleading,” engaged in “masterful hairsplitting” and even “lied to Congress.” Several Democrats on the committee, elsewhere in Congress and on the presidential campaign trail called for Mr. Barr’s resignation or even impeachment.

The conflict escalated afterward when Mr. Barr announced that he would not show up for a parallel hearing on Thursday before the Democrat-controlled House Judiciary Committee. Mr. Barr objected to the format of questioning, which would have included questioning by staff lawyers, not just lawmakers. Democrats may now opt to subpoena him, setting up a possible showdown in court.