Congressional Democrats are ramping up their attacks on Republicans for blocking the reauthorization of the Export-Import Bank, a federal agency that provides credit for foreign purchasers of U.S. goods. But their headline-grabbing criticism, which casts the GOP as job killers, puts the Democratic Party at odds with one of its leading presidential candidates: Vermont Sen. Bernie Sanders.

As a House member, Sanders authored legislation in 2002 that would have forbidden Export-Import Bank support from going to corporations that lay off more U.S. workers than foreign workers. Sanders argued that U.S. taxpayers were effectively subsidizing the offshoring of American jobs, and he noted that companies like General Electric were receiving Export-Import support even as the company shipped jobs overseas. A majority of House Democrats voted for Sanders' provision to rein in the bank, and Sanders later voted against reauthorizing the bank along with 26 Democrats.

During the 2002 debate, Sanders said that “this is an example of where progressives, such as myself, and conservatives, are coming together to protect the American taxpayer and the workers of this country in opposition to an outrageous example of corporate welfare.” That line of criticism was a mainstream Democratic position throughout much of the 2000s when George W. Bush was president; then-Sen. Barack Obama called the bank “little more than a fund for corporate welfare.”

The politics surrounding the bank abruptly shifted, however, when Obama won the White House.

After receiving campaign contributions from various companies that benefit from Ex-Im Bank support, Obama backed legislation to reauthorize its charter. At the same time, with the rise of the tea party and with GOP financiers like the Koch brothers railing against what they deemed "corporate welfare," a majority of Republican lawmakers joined Sanders’ efforts to eliminate the bank.

The recent votes on reauthorization illustrate the shift. In the 2015 senate votes, stalwart liberals like Sen. Sherrod Brown, D-Ohio, and Sen. Tammy Baldwin, D-Wis. -- who had voted against reauthorization in 2002 as House members -- backed the bank as senators. Similarly, 10 House Democrats who voted against the bank in 2002 voted to support it in 2012. Meanwhile, from 2002 to 2012, the number of House Republicans voting against the bank nearly doubled.

In 2012 and 2015, Sanders was the only Democratic Party-aligned lawmaker in either congressional chamber to continue voting against the standalone reauthorization bills -- and he did not soften his rhetoric. “At a time when almost every major corporation in this country has shut down plants and outsourced millions of American jobs, we should not be providing corporate welfare to multi-national corporations through the Export-Import Bank," he said after his June 2015 vote.

Now, as the House GOP recently blocked a bill to reauthorize the bank’s charter, Democrats are mounting an aggressive campaign to portray Republicans as job killers for opposing the bank.

In June, President Obama published an op-ed demanding Congress reauthorize the bank. Citing General Electric’s recent move to ship 500 jobs overseas, one former Ex-Im opponent, Rep. Maxine Waters, D-Calif., said: “GE’s announcement today reflects the human costs of continued Republican obstruction to any efforts to renew the charter of [the] Export-Import Bank over the long term.” Similarly, Sanders’ longtime ally Sherrod Brown has reversed his opposition to the bank, and is now spearheading the Senate effort to reauthorize it. He, too, says it is a crucial tool to create U.S. jobs.

The political problem for congressional Democrats’ campaign could be their own surging presidential candidate, Sanders. His votes and floor speeches, coupled with his newfound prominence in the 2016 campaign, provide Export-Import Bank critics with a weapon to defend themselves against the Democrats' assault.

The situation could also, though, be perilous for Sanders in his quest for Democratic presidential nomination.

national poll by Morning Consult released in April found that a plurality, 38 percent, of self-described liberal voters said they believe the bank "supports U.S. jobs" and roughly the same number, 37 percent, of liberals said they believe the bank should be reauthorized.

Sanders' rival, Hillary Clinton -- whose family foundation and campaigns have received support from major Ex-Im recipients such as Boeing and General Electric -- has said she is "a very strong supporter of the Ex-Im Bank" and has publicly derided bank opponents as driven by "ideology" rather than results. That criticism -- and the portrayal of the bank as a vital job creator -- could end up aimed back at Sanders as the Democratic primary intensifies.