Steven Mnuchin arrives at Trump Tower in New York for meetings with President-elect Donald Trump, in New York on Nov. 17, 2016. (Eduardo Munoz Alvarez/Agence France-Presse via Getty Images)

A leading candidate to be ­President-elect Donald Trump’s treasury secretary was deeply involved in running a bank that has received $900 million in federal bailout money and that has been accused of discrimination — examples of the potentially thorny conflicts of interest that could plague Trump’s nascent administration.

Steven T. Mnuchin was the finance chairman for Trump’s campaign, and three people close to the presidential transition team said that at the moment he is among the most likely candidates to helm Treasury. Mnuchin, a Goldman Sachs veteran, made his name as a private investor when he led the 2009 purchase of failed subprime mortgage lender IndyMac, the California bank whose long lines of customers waiting to withdraw their money became an enduring image of the financial crisis.

Central to the deal was a promise by federal regulators to cover a significant share of the bank’s losses — a guarantee that lasts through 2019. In addition, the bank — later renamed OneWest — has repeatedly faced criticism over its attempts to foreclose on homeowners who were in the process of modifying their loans, among other practices.

On Thursday, an advocacy group filed a complaint with the Department of Housing and Urban Development accusing the bank of locating branches in predominantly white neighborhoods while avoiding minority communities, including two years in which only two black borrowers received home loans across six counties.

1 of 81 Full Screen Autoplay Close Skip Ad × Inside Trump Tower: The epicenter of a presidential transition View Photos The setting for Donald Trump’s reality TV show and campaign headquarters now serves as the president-elect’s base of operations. Caption In Manhattan, the setting for Donald Trump’s reality-TV show and campaign headquarters now serves as the president-elect’s base of operations. Jan. 16, 2017 Martin Luther King III, son of civil rights leader Martin Luther King Jr., exits an elevator at Trump Tower in New York with President-elect Donald Trump. Mark Abramson/for The Washington Post Buy Photo Wait 1 second to continue.

“If you look at the story of IndyMac and OneWest, it’s a story of hardship, foreclosure and pain for working communities, and a story of profit for investors,” said Kevin Stein, deputy director of the California Reinvestment Coalition, the umbrella organization representing more than 300 community groups that filed the complaint.

Mnuchin’s long involvement with the bank could raise questions about his ability to lead an agency at the forefront of the government’s oversight of the financial industry. OneWest was purchased last year by the financial firm CIT, which is partially overseen by Treasury. It has been named a “systemically important” financial institution — often informally called “too big to fail” — worthy of additional scrutiny because of the risk it poses to the economy in a crisis. Mnuchin is on CIT’s board of directors and owns $100 million in company stock, according to compensation research firm Equilar.

“Whenever you have someone coming from the financial sector, you’re going to see issues, especially post-bailout,” said Jordan Libowitz, communications director at Citizens for Responsibility and Ethics in Washington.

Mnuchin is one of several Cabinet candidates and members of Trump’s transition team whose close ties to the industries is drawing criticism from some lawmakers. Oil industry magnate Harold Hamm is under consideration for energy secretary. The list of financiers advising Trump includes Anthony Scaramucci, Steve Feinberg and John Paulson, who was one of Mnuchin’s partners in the deal to buy IndyMac. Former New York mayor Rudolph W. Giuliani, whose consulting company has had extensive contracts with foreign governments, could be the next secretary of state.

Other widely discussed candidates for treasury secretary, including JPMorgan Chase chief executive Jamie Dimon and private equity financier Wilbur Ross, might face conflicts of their own.

A spokesman for Mnuchin declined to comment. But a person close to him, speaking on the condition of anonymity because his employer does not allow him to talk on the record, said that while at the bank, Mnuchin’s “entire mission was to save people’s homes.”

CIT said in a statement that it “is committed to fair-lending and works hard to meet the credit needs of all communities and neighborhoods we serve.”

The purchase of IndyMac is just one of the many complex deals that Mnuchin has struck over his decades in the upper echelons of finance. He spent 17 years at Goldman Sachs before leaving to join an investment fund set up by hedge fund investor — and prominent Democrat — George Soros. Mnuchin helped back the construction of Trump International Hotel and Tower in Chicago — and was later sued by Trump in an effort to secure more favorable terms. And after moving to California to take control of IndyMac, Mnuchin reinvented himself as a film producer and financier, putting out blockbusters such as “Avatar” and “Suicide Squad.”

Mnuchin would not be the first Wall Street veteran to be recruited for treasury secretary, of course. Robert Rubin spent more than two decades at Goldman Sachs before joining President Bill Clinton’s administration. Henry M. Paulson Jr. was chief executive of the storied investment bank when he was nominated to the post by President George W. Bush and moved to sell about $500 million in Goldman stock upon his confirmation.

Government ethics experts said Mnuchin could avoid conflicts of interest by severing his ties to the industry. If Mnuchin were nominated, the Office of Government Ethics and the Senate committee overseeing his confirmation would recommend how to proceed. It would almost certainly entail Mnuchin’s stepping down from executive positions, the experts said, and it could include creating a blind trust for his assets or divesting his holdings in financial firms.

“The only way for him to be treasury secretary is to sell all of his holdings in financial services companies,” said Richard Painter, a law professor at the University of Minnesota who served as chief ethics lawyer under President George W. Bush.

Libowitz, of Citizens for Responsibility and Ethics in Washington, agreed. “That way the public can rest assured that whatever decisions they make are not for their personal profit but for the good of the American citizen.”

Still, Mnuchin’s connection to a bank under criticism over its handling of consumer mortgages and still receiving government aid could complicate his appointment, particularly amid the rising populist sentiment against Wall Street that helped propel Trump to his presidential victory.

“Steve Mnuchin is the ultimate Wall Street insider, a wheeler-dealer,” said Marcus Stanley, policy director at the nonprofit coalition Americans for Financial Reform. “That gives us a lot of concern. We are opposed to having people who are Wall Street insiders being the people who regulate Wall Street.”

The Trump transition team did not respond to a question about the steps his Cabinet would take to diminish conflicts of interest.

Mnuchin decided to invest in the banking industry after watching news coverage of the run on IndyMac in 2008, according to an interview he gave four years later to Bloomberg News. It was a major gamble during the collapse of the housing market. IndyMac was ground zero for some of the worst lending abuses, including shoddy documentation and high loan-to-value ratios.

He offered to pay $1.55 billion for the remains of IndyMac: about $13.9 billion in assets covering 57,000 homeowners. The Federal Deposit Insurance Corp., a government agency, had taken over the bank and was desperately seeking buyers at a time when financial markets were cratering and even the nation’s biggest banks were trembling.

To lure buyers, the agency promised to share in any future losses on the bank’s outstanding loans. Mnuchin and his partners were responsible for the first $2.5 billion, then the FDIC would cover 80 percent of the losses until they totaled $3.8 billion.

After that, the government would reimburse the bank for 95 percent of its losses. The bank is expected to reach that level — and continue receiving government payments — by 2019, when the agreement ends, according to documents on the FDIC’s website.

“Steven was the guy who rode in on a horse when nobody else would,” the person close to Mnuchin said. “He was the guy who showed up to save it.”

As an owner and chairman of the bank, Mnuchin was actively involved in steering its direction, according to the Bloomberg News interview. Under his leadership, the bank not only survived but also expanded as he bought other failed lenders across California.

The result was a windfall for Mnuchin and his private equity firm, Dune Capital. CIT acquired the bank last year for $3.4 billion, roughly double the original sale price.

“Right from Day One, when you have a venture deal like that, you are thinking of how do I exit? How do we liquefy our profits so we can go on to the next thing?” said Bert Ely, a banking consultant in Alexandria, Va. “It was a very profitable deal for Mnuchin and company, and I don’t fault them for that.”

But the bank remained a target for consumer advocates and watchdog groups under Mnuchin. In the complaint filed Thursday with the Department of Housing and Urban Development, advocates alleged that only 11 of the bank’s 74 branches are in Hispanic neighborhoods. One was in a majority Asian neighborhood, and there were none in predominantly black communities.

The complaint covers the final year of Mnuchin’s tenure at OneWest; the sale to CIT was completed in August 2015. The California Reinvestment Coalition’s analysis of loans made that year alleged that only 8.4 percent of mortgages went to Hispanics, though they accounted for 43 percent of the region’s population. It also alleges that the bank did not properly maintain foreclosed homes in minority areas.

“The evidence included in this complaint suggests that OneWest Bank has steered clear of people of color in its assessment areas for a number of years,” said Sharon Kinlaw, executive director of the Fair Housing Council of San Fernando Valley. “We want to know how many people were harmed and we look forward to learning what HUD finds out.”

But the person close to Mnuchin said the bank had sharply curtailed its mortgage lending to focus on working through IndyMac’s massive portfolio of distressed loans. Though the bank was part of the federal government’s earliest attempts to modify mortgages, the majority of its business was servicing loans owned by others.

OneWest successfully modified many of the hundreds of thousands of loans it managed after purchasing IndyMac and other failed banks. But as the housing crisis deepened, Mnuchin’s bank came under criticism for the pace of its foreclosures and what customers complained was a hard-line stance.

Their frustration hit a peak in 2011 as homeowner Rose Gudiel led a protest in front of Mnuchin’s home in the tony Bel Air neighborhood of Los Angeles. Gudiel said she missed her mortgage payments after her younger brother was fatally shot and she was furloughed from her state government job. Gudiel said she was applying for a loan modification when OneWest issued a notice that it would foreclose. Though the bank was servicing the loan, it was owned by Fannie Mae.

About 100 demonstrators gathered outside his home. They brought a mattress, a nightstand and a lamp to illustrate her fear of sleeping on the streets if she lost her house.

After the protest, Gudiel said she qualified for a loan modification and hasn’t missed a payment since receiving it. She is still living in her three-bedroom home outside of Los Angeles. In an interview, she reflected on what she would tell the man who could become treasury secretary.

“If you’re going to hold that type of position, I hope you know how to truly help this country,” Gudiel said. “The only way this country is going to come ahead is if you help the people that live in it versus taking them out of their homes. They end up being a charge to society versus a contribution.”

Philip Rucker and Elise Viebeck contributed to this report.