Bernie Sanders campaigned, hard, for Barack Obama’s re-election.

But the independent senator from Vermont is not going to rubberstamp the president’s selection of Jack Lew, a supporter of banking deregulation who has passed back and forth through the revolving door from Wall Street to Washington, as the nation’s seventy-sixth secretary of the Treasury.

While Sanders caucuses with the Democrats, he represents the people who elected him. And he swears an oath to a Constitution that requires—not “allows,” requires—the legislative branch of the federal government to check and balance the executive branch.

One of the Senate’s most vital duties is that of providing “advice and consent” on presidential nominations. A president has broad leeway when it comes to naming members of the cabinet—arguably broader leeway than in the naming of lifetime appointees to the federal judiciary. But that leeway is not such that senators can or should simply approve every nominee. Advice should be given, and at times consent should be denied—not just by partisan foes of the sitting president but, sometimes, by allies of that president.

In the hyper-partisan environment of today’s Washington, it is common for members of the party caucus affiliated with the president to go along with any pick the president makes. But there are times when principle must prevail over partisanship.

Sanders, who has a history of breaking with Democratic and Republican presidents on economic-policy issues, says Jack Lew is the wrong candidate for the Treasury post being vacated Tim Geithner, whose bias in favor of Wall Street was such that his 2009 nomination was opposed by Sanders, Iowa Senator Tom Harkin, Wisconsin Senator Russ Feingold and West Virginia Senator Robert Byrd..

Here’s how Sanders explains his opposition to the Lew nomination:

“Jack Lew is clearly an extremely intelligent person and I applaud his many years of public service to our country. I believe that he will be confirmed by the Senate. Unfortunately, he will be confirmed without my vote. At a time when the middle class is collapsing and millions of workers are unemployed, I do not believe he is the right person at the right time to serve in this important position.

“As a supporter of the president, I remain extremely concerned that virtually all of his key economic advisers have come from Wall Street. In my view, we need a treasury secretary who is prepared to stand up to corporate America and their powerful lobbyists and fight for policies that protect the working families in our country. I do not believe Mr. Lew is that person.

“We don’t need a treasury secretary who thinks that Wall Street deregulation was not responsible for the financial crisis. We need a treasury secretary who will work hard to break up too-big-to-fail financial institutions so that Wall Street cannot cause another massive financial crisis.

“We don’t need another treasury secretary who believes in ‘deficit neutral’ corporate tax reform. We need a treasury secretary willing to fight to make sure that large, profitable corporations pay their fair share in taxes to reduce the deficit and create jobs.

“We don’t need a treasury secretary who will advise the president that he should negotiate with the Republicans to cut Social Security, Medicare, and Medicaid benefits. We need someone who is going to strengthen these programs.

“We don’t need another treasury secretary who believes that NAFTA and Permanent Normal Trade Relations with China have been good for the American economy. We need someone in the White House who works to fundamentally re-write our trade policy to make sure that we are exporting American goods, not American jobs.”

It is probable, as Sanders suggests, that Lew’s nomination will be approved.

But that approval will not be unanimous.

Most of the opposition is likely to come from Republicans, like Alabama Senator Jeff Sessions, who object to the fact that Lew does not embrace the European-style austerity agenda that they seek.

But just because economic reactionaries like Sessions are opposed to Lew does not mean that he is the right person to take charge of the Treasury Department. There is great danger in approaching fundamental questions about the nation’s direction with a simplistic “the-enemy-of-my-enemy-is-my-friend” approach. Economic and fiscal policy choices need to be more nuanced, and principled than that.

So it is healthy, very healthy, that Lew will face opposition from those on the left—led by Sanders—who recognize that a big part of what ails the American economy can be traced to the Wall Street-to-Washington revolving door through which Tim Geithner and Jack Lew have passed.