Sen. Al Franken announced on Thursday that he will resign from the U.S. Senate following multiple accusations of sexual misconduct. Once Franken officially leaves office, Democratic Gov. Mark Dayton will appoint a replacement (possibly Lt. Gov. Tina Smith) who will hold the seat through the 2018 midterm elections. In 2018, a special election will take place to determine who will hold the seat until the regularly scheduled election in 2020. Whether Dayton’s pick runs in 2018 or not, the eventual Democratic candidate will likely be favored to win that race — though it’s not a sure thing.

The good news for Minnesota Democrats is that the political environment is, at this point, heavily in their favor. They hold an 8 percentage point lead on the generic congressional ballot. If that holds through 2018 — not a bad bet — and nothing weird happens, Democrats will be favorites to hold on to the Franken seat. The last time there was no elected incumbent running in a Minnesota Senate race in this type of pro-Democratic midterm environment, for example, Democrat Amy Klobuchar won by 20 points.

The not-so-great news for Minnesota Democrats is that the state has become redder since 2006. Really, Minnesota is a purple state. Hillary Clinton beat President Trump by only 1.5 points in Minnesota — less than her 2.1-point margin in the national popular vote. In our partisan lean calculation, Minnesota is just 0.5 percentage points more Democratic than the nation. In other words, Klobuchar’s landslide win might have been a bit of an aberration. Back in 2008, another very good year for Democrats, Franken first won his Senate seat by just 312 votes.

This is all a slightly complicated way of saying that Minnesota is likely to stay blue in 2018, but not because of anything fundamental about Minnesota. Instead, Democrats’ advantage comes almost entirely from the friendly political environment, which can change.

When you combine the current national environment (+8 points Democratic, as measured by the generic congressional ballot) and the presidential lean of Minnesota (basically even), in the 2018 Minnesota Senate race where no elected incumbent is running, a generic Democrat would be favored to beat a generic Republican by a margin in the high single digits. Compare that to New Jersey, where a scandal-tarred Sen. Bob Menendez is still forecasted to win by about 20 points based on the same basic math. The projected single-digit margin in Minnesota suggests that Republicans have a chance of winning there, depending on how the race develops and especially if the environment shifts a little in their favor.

Indeed, there are a number of instances where the opposition party (that’ll be the Democrats in 2018) lost races in similar states in similar situations. Since 1982, there have been 23 midterm Senate elections that have taken place in purple states where there was no elected incumbent on the ballot, and in those races, the president’s party (that’ll be the GOP in 2018) has won seven out of 23 times (30 percent). The president’s party won in this situation as recently as 2010, so it’s hardly unheard of. In that race, Colorado’s appointed Democratic Sen. Michael Bennet defeated Republican Ken Buck in a midterm environment that was about as favorable to Republicans as 2018 looks to be favorable to Democrats.

Ultimately, we’ll need to see which candidates both Democrats and Republicans run in Minnesota to fully grasp each side’s chances. Candidate quality still matters in Senate elections (see Alabama 2017). If Democrats can select a candidate who is able to separate her- or himself from Franken’s brand, she or he will probably have a better shot than a generic Democrat. On the other hand, if the Republicans choose a strong candidate, she or he may be able to capitalize on residual anger against Franken, whose approval rating plummeted following the allegations made against him.

For now, the most we can say is that the 2018 Minnesota Senate race leans Democratic, but Republicans have a real shot.