Grilled by Senate Democrats on Thursday, Steven Mnuchin firmly defended his record as a banker. He insisted that regulators -- not the California bank he owned -- were at fault for a series of troubling foreclosures on widows, military families and other vulnerable homeowners during the Great Recession.

One of the final Donald Trump Cabinet picks to face Congress, Mnuchin went before the Senate Finance Committee. He faced policy questions about taxes, the debt ceiling and banking regulation.

The opposing party also focused squarely on failed subprime lender IndyMac, which Mnuchin bought in 2009 and renamed OneWest. The bank has been accused of discriminating against minority borrowers, a charge that Mnuchin denied.

Democratic senators asked sharp questions about whether OneWest worked hard enough to help struggling borrowers. They read out a number of anecdotes about homeowners, including families of military servicemembers, who lost their homes to foreclosure.

"Since I was first nominated to serve as Treasury secretary, I have been maligned as taking advantage of others' hardships in order to earn a buck. Nothing could be further from the truth," Mnuchin said.

He said his bank extended more than 100,000 loan modifications to delinquent borrowers to try to help them. But he said his bank was often bound by prior contracts.

Mnuchin said he was concerned with the foreclosure practices while he ran the bank, but was given no choice by federal rules he was required to follow. "My group had to adhere to servicing agreements which limited our ability to modify loans that could have helped borrowers," he said.

The bank's foreclosure record, particularly with reverse mortgages given to elderly homeowners,also got a lot of attention at the hearing.

Related: Trump Treasury pick Mnuchin has a 'widow foreclosure' problem

It's not just his banking record that's generating criticism.

Even before the hearing began, Democrats went on the attack Thursday about offshore investments Mnuchin has in the Cayman Islands, which they charged had not been submitted to the committee as part of his financial disclosure.

"Mnuchin's failure to disclose his Cayman Islands holdings just reeks of the swamp that the President-elect promised to drain on the campaign trail," said Sen. Charles Schumer, the Democrats' senate leader. "It's no wonder that Republicans are trying to rush these nominees through the Senate, but the American people and Senate Democrats are not going to stand for it."

Under questioning about those holdings, Mnuchin said the offshore entities were set up to benefit clients of his client, including pension funds and not-for-profits. He denied that he had used these holdings to reduce his personal taxes. He also said he supports simplifying the tax code, which would eliminate such offshore loopholes.

But Democrats on the committee still questioned and criticized Mnuchin for setting up the offshore entities, even if he didn't use them to lower his own taxes.

"What you did may have been legal but it was to help people and entities avoid U.S, taxes," said Sen. Bob Menendez of New Jersey.

Republican committee members, especially chairman Orrin Hatch, frequently came to Mnuchin's defense during the hearing, suggesting that his confirmation is probably safe in the Republican-controlled Senate.

Related: OneWest's foreclosure heartbreak stories

But Democrats sought to score political points with a variety of harsh questions, including about OneWest's foreclosure practices. Exchanges sometimes became heated.

"You've been pretty defensive, probably for good reason, on what happened at OneWest," said Sen. Sherrod Brown of Ohio.

Mnuchin responded that while errors were made on foreclosures, OneWest had a better record on errors than other banks.

"I'm not defensive. I'm proud," he said.

"I wouldn't be proud [of OneWest's record]," Brown shot back.

Among the bank's cases that have gotten attention was its attempt to foreclose on a then-90-year-old Florida woman who had a reverse mortgage from a unit of OneWest after she accidentally came up 27 cents short on an insurance payment.

Mnuchin's bank sued to foreclose on the home, where she had lived for 40 years. She won the right to stay in the home in a subsequent court case.

Mnuchin said he couldn't comment on specific cases, but he said that he wrote to the Department of Housing and Urban Development, which oversees these reverse mortgages, and asked it to change its policy "so that we would not be forced to foreclose on senior citizens who were behind only small amounts on taxes and insurance."

"I was so troubled by this that I discussed it with our primary regulator, the Office of the Comptroller of the Currency," Mnuchin said. "Unfortunately, HUD did not see it my way, and we were forced to foreclose on senior citizens even when they only owed $1."

Critics of OneWest and the attorney who sued on behalf of the Florida woman insist that OneWest's policies frequently sought improper foreclosures, and that the bank was far more aggressive dealing with foreclosures than other reverse mortgage lenders were.

--CNN's Tal Kopan and Phil Mattingly contributed to this report.