WASHINGTON — Jacob J. Lew, President Obama’s nominee for Treasury secretary, faced some fierce questioning on Wednesday from the Senate Finance Committee on his tenure at the bailed-out Citigroup and on an investment based in the Cayman Islands. But the even-tempered, bookish Mr. Lew parried the blows and appeared likely to win the committee’s approval and Senate confirmation.

“Frankly, I think you’ve done really well today,” said Senator Orrin G. Hatch of Utah, the ranking Republican on the committee. “My gosh, I have nothing but respect for people like you who give yourself to our government.”

Many questions from Senate Republicans seemed intended to rankle or ruffle Mr. Lew and score some political points. Senator Richard M. Burr of North Carolina asked about the Benghazi attack in Libya. Senator Charles E. Grassley of Iowa, referring to Mr. Lew’s lucrative but short time at Citigroup, commanded him to “explain why it might be morally acceptable to take close to a million dollars out of a company that was functionally insolvent and about to receive a billion dollars of taxpayer support.”

Mr. Lew calmly responded, “I was compensated for my work. I’ll leave for others to judge.”

He emphasized that he had worked in operations at Citigroup, albeit for a time at an investment unit that made proprietary trades on behalf of the bank.