It wasn’t a good week for Bernie Sanders. After suffering a string of primary-contest losses, the Democratic presidential candidate’s path to the White House looks increasingly grim, if not outright impossible. But Sanders isn’t giving up. Even in the face of defeat, the campaign has defiantly promised to forge ahead.

There are plenty of reasons for the Vermont senator to stay in the race even if winning the White House is improbable. Sanders routinely talks about creating a political revolution,” and he may never again have the opportunity to preach a populist message to massive crowds across the country. The campaign has built a highly engaged grassroots network of support and raked in millions of dollars. The longer Sanders fights for the nomination, the more time he has to increase his following and fundraising. He can point to both metrics as evidence of popular support while pushing policy priorities on Capitol Hill. Continuing to campaign also gives Sanders additional opportunities to pressure his rival, Hillary Clinton, to adopt an increasingly progressive agenda.

For now, the Sanders campaign insists that it still has a shot to win the White House and shows no signs of deviating from that focus. “We are feeling very good,” Jeff Weaver, the Sanders campaign manager, told reporters on Wednesday. “We are going to carry this campaign on to success in the summer and then ultimately in the fall.” The campaign argues that the map will prove favorable going forward. In the next month, six states will hold caucuses, contests that often reward grassroots enthusiasm, which could give Sanders an edge. Some of the states coming up on the primary calendar also feature heavily white electorates, a demographic makeup that has helped deliver victory for Sanders in the past.

Still, Sanders has fallen far behind Clinton’s commanding delegate lead, and the probability that he can catch up is extremely low. “Bye bye, Bernie: The Democratic race is all but over,” The Washington Post declared on Wednesday. At some point, the Sanders campaign will have to contemplate what happens if the uphill fight can’t be won.

It is difficult to say how much staying power the movement Sanders has worked to build will have. The senator’s ability to achieve his political objectives over the long-term could hinge on the way the campaign is run from here on out as well as what comes next. The more money and grassroots enthusiasm Sanders taps into now, the easier it will be for the senator and his allies to sustain a progressive network of support that remains active and relevant after the dust settles on the presidential election. Matthew Yglesias makes the case at Vox that Sanders should look beyond the election, arguing, “Sanders’s best play now is to try to consider how to create an institutional and financial infrastructure that will carry forward into the future so that other politicians can stand on his shoulders rather than needing to reinvent the wheel.”

There is precedent for channeling grassroots enthusiasm ginned up on the campaign trail into political institutions. Sanders’s fellow Vermonter Howard Dean, who tapped into populist sentiment during his unsuccessful 2004 bid for the Democratic presidential nomination, founded Democracy for America, a progressive political organization that helped lead the ultimately futile effort to draft progressive icon Elizabeth Warren into the 2016 presidential race. There’s also Organizing for Action, a group that The Washington Post once described as “a nonprofit group that grew out of Obama’s campaign machine” and that has subsequently worked to support the president’s agenda.

The idea that support for Sanders could translate into something more lasting than a presidential campaign appears to already be on the minds of some Democratic operatives. National Journal reports, “Some Democrats [have] suggested Sanders could be even more influential after the convention by creating an advocacy group modeled on Democracy for America.” Still, it could be quite a challenge for the Sanders campaign to retool, especially if it lacks deep ties to the Democratic establishment that could prove useful in providing institutional knowledge and support for such an effort. The idea of a formal organization promoting the senator’s fiery brand of progressive politics or Sanders as a political powerbroker for the Democratic Party also seems at odds with, and potentially damaging to, the popular image of Sanders as an outsider.

In the meantime, Sanders faces plenty of risk by remaining in the race. His influence beyond the election depends, in part, on how much goodwill he can amass and maintain. If the campaign pursues any strategy, issue, or even tone that rubs supporters the wrong way, it could erode any advantage to sticking out the primary election. In recent weeks, the campaign has been more forceful in drawing a contrast with Clinton, which could prove grating to Sanders supporters who are more interested in his positive “A Future to Believe In” message than in seeing him go after Clinton. That could hurt Sanders’s brand and Clinton’s general-election prospects by lending an air of legitimacy to similar Republican attacks against her.

The Sanders campaign will have to be careful as it works to justify its continued presence in the race. The campaign has suggested lately that Clinton’s delegate lead isn’t set in stone. It has indicated that Sanders may be able to win over superdelegates—the influential Democratic Party leaders and elected officials who can sway the tally—by pointing to his popularity and electability. The campaign has also suggested that pledged delegates—allocated to a candidate on the basis of primary or caucus results—might flip. “We’re not out trying to convince anybody to do anything at the moment,” Sanders senior strategist Tad Devine told reporters on Wednesday, though he added that a “delegate lead with pledged delegates can become very soft if you don’t continue to win.” That could be a risky argument for the campaign given how much Sanders’s progressive supporters remain intent on upholding the popular vote. Many progressives also deeply distrust the superdelegate system, viewing it as evidence of the undue influence of party elites on primary elections.

For all that, Sanders’s continued presence in the race could ultimately help Democrats in the general election, even if he doesn’t make it there himself. Sanders has increasingly taken aim at Republican presidential front-runner Donald Trump on the campaign trail. Sanders’s attacks on Trump could help persuade his supporters not to stay home  if Trump eventually squares off against Clinton. Even Team Sanders, for all its optimism, admits that the campaign faces long odds. “I think it is what it has always been, which is an uphill fight,” Weaver said. “It has always been an uphill fight, and it continues to be.” Still, as long as supporters remain loyal and money continues to flood in, the campaign is poised to press on.