WASHINGTON — Secretary of State Mike Pompeo skirmished with a senior House Democrat on Wednesday in a bitter back-and-forth over his treatment of Hillary Clinton in the aftermath of a 2012 deadly attack on a diplomatic compound in Benghazi, Libya.

The striking exchange in front of the House Foreign Affairs Committee — over the security of diplomats abroad — came during Mr. Pompeo’s first Capitol Hill appearance since taking over the State Department.

It bared the simmering but fierce partisanship on a House committee that prides itself on being among the most evenhanded panels in Congress. And it was a reminder that while Mr. Pompeo now largely projects an image of moderation as the United States’ chief diplomat, he was once one of the most partisan warriors in Washington.

The hearing touched on a range of foreign policy issues and hot spots — including North Korea, Iran and South Sudan — and Mr. Pompeo displayed a deep knowledge on most subjects and candidly admitted when he did not know an answer.