The Senate confirmed Steven T. Mnuchin as treasury secretary in a narrow vote Monday evening, putting an end to a contentious and protracted debate while adding another former banker to President Trump’s roster of advisers.

Mnuchin ran a bank, OneWest, that foreclosed on tens of thousands of Americans following the financial crisis, and Democrats argued that he would not represent the financial interests of ordinary Americans in office. Mnuchin and his allies claimed that OneWest’s foreclosures were largely in accordance with federal guidelines.

As secretary, Mnuchin will be responsible for managing the nation’s finances from day to day, and will have to carry out a broad order from his new boss to review the rules imposed on the financial sector through Dodd-Frank reform of 2010. A report to Congress on whether foreign countries are manipulating their currency is due in April.

Beyond these immediate tasks, Mnuchin will also confront broader questions, assuming an influential position in a new administration that has not yet clearly signaled how the president will approach the economy. The agenda that Republican lawmakers and several of Trump’s advisers favor — tax relief, deregulation and limited economic intervention by the federal government — is in some respects at odds with Trump’s own populist and protectionist rhetoric, especially on whether the government will impose new barriers to global trade.

Mnuchin, a Hollywood financier and a former partner at Goldman Sachs, will join several other former bankers with senior positions in Trump’s administration, including Transportation Secretary Elaine Chao, White House chief strategist Stephen K. Bannon and National Economic Council director Gary Cohn. The White House’s reliance on Wall Street in staffing the administration has drawn criticism from Democrats.

“For someone who pledged to drain the swamp and advocate for working people, President Trump’s nomination of Mr. Mnuchin to be Secretary of the Treasury amounts to another broken promise,” said Sen. Tim Kaine, D-Va., the former vice presidential candidate, in a statement. “His complicity in the 2008 financial crisis raises serious doubts.”

Democrats also felt that Mnuchin had not been truthful with lawmakers. In his initial written responses to the Senate Finance Committee, he failed to disclose a stake worth some $100 million in assets as well as an interest in a company in the Cayman Islands. Mnuchin also wrote that OneWest had not foreclosed on borrowers using unverified paperwork — a controversial practice called “robo-signing.”

Later, when Democrats discovered those financial interests and a report in the Columbus Dispatch cited court papers showing evidence of robo-signing, Democrats in the committee first postponed and then boycotted a vote to advance Mnuchin’s nomination.

Republicans responded with an unusual suspension of the Senate’s rules, allowing the vote to proceed without any Democrats in the room.

The lawmakers dismissed the Democratic boycott as obstructionism, calling Mnuchin a qualified and experienced candidate.

“We can have our disagreements,” Sen. Orrin G. Hatch, R-Utah, the chairman of the committee, said at the time. “To differ, that’s one thing. I can live with that. I’ve differed myself from time to time. But I’ve always shown up.”

The committee’s vote all but ensured Mnuchin’s confirmation on the floor of the Senate. Fifty-three senators voted in favor, while 47 voted against the former banker Monday evening.

Sen. Joe Manchin III, D-W.Va., broke ranks to join Republicans in supporting the nominee.

Waiting on Mnuchin’s new desk at the treasury will be Trump’s order for a review of rules governing the financial sector, which the new secretary will have just under four months to complete. While Trump’s order has little practical effect in itself, it gives Mnuchin the opportunity to set an agenda and establish priorities for deregulating Wall Street.

Mnuchin will also have to make decisions about currency. As secretary, it will Mnuchin’s responsibility to determine whether foreign countries are manipulating their currency to give their own exporters an advantage over U.S. firms.

Few expect Mnuchin to deliver on Trump’s promise to label that China a manipulator. While most economists agree that China manipulated its currency in the past, Beijing’s most recent interventions in foreign exchange have been to the advantage of U.S. workers and manufacturers.