The final polls show Democrats remain underdogs for control of the Senate going into Election Day. They face an extraordinarily difficult map, defending far more seats than the GOP, including many in conservative states.

But many key races remain quite close, and the party has paths remaining to retake the chamber — though they’re difficult ones.

Let’s start with the Democrat-held seats — the ones the party has to defend. The latest RealClearPolitics polling averages for those key races are as follows:

Democrat losing by 11 percentage points: North Dakota

North Dakota Very close (zero to 2 point) races: Missouri and Indiana

Missouri and Indiana Democrat leading by 2 to 5: Florida, Montana, and West Virginia

Florida, Montana, and West Virginia Democrat leading by 7 to 11: Minnesota special, Ohio, New Jersey, Michigan, Wisconsin

Then there are the four main GOP-held seats Democrats are targeting. The RealClearPolitics averages currently show:

Very close (zero to 2 point) races: Nevada and Arizona

Nevada and Arizona Republican leading by 5 to 6: Texas and Tennessee

In addition, there’s a “jungle primary” in Mississippi today that will probably advance one Republican and one Democratic candidate to a runoff election, which would be held near the end of the month.

Democrats start off needing to gain two GOP-held seats for a majority. But Democrats also have many more imperiled incumbents, and for each one who loses, they’d have to pick off another GOP-held seat to keep their hopes of Senate control alive. These polls are why every pundit and forecaster agrees that Republicans are the favorite to hold the majority.

But you shouldn’t expect these polls to predict the outcomes perfectly — far from it. Polling errors in the mid-single digits are fairly common in individual Senate races, and in recent cycles, there’s been at least one really big miss each year. On average, there can also be a partisan bias — polls underestimated Republican candidates in key Senate races in 2014 and 2016, and underestimated Democratic candidates in 2012.

The current lay of the land in the Senate

While Republicans are playing whack-a-mole against Democratic challengers who keep popping up in the House, it’s Democrats who are faced with that difficult task in the Senate. They’re defending 26 seats to Republicans’ nine, and many of those Democratic incumbents are in states Donald Trump won.

The challenge is that for each Democratic incumbent who loses, the number of Republicans who have to be defeated goes up — and that, very quickly, Democrats run out of targets.

So let’s say Democrats have a good night and win every Senate race where there’s a difference of 5 points or fewer between the candidates right now, as well as all the other races they currently lead by larger margins.

That’s not such a stretch — nearly all of the toss-up Senate races in the final RealClearPolitics averages have often been won by the same party each cycle. Republicans won six of the eight toss-ups in 2016 and six of the seven toss-ups in 2014. Democrats, meanwhile, won six of the seven toss-ups in 2012.

This year, Democratic wins in all the races where the polls are close would deliver them two pickups of GOP-held seats, in Nevada and Arizona, in addition to getting almost every Democratic incumbent reelected. That would get them within one seat of a majority — because of the expected loss of Sen. Heidi Heitkamp (D-ND), the sole Democratic incumbent who has fallen behind her Republican challenger substantially in RealClearPolitics’ average. (She trails by 11.)

It’s possible the polls are off in North Dakota — there have been relatively few, and the state is difficult to poll. But if Heitkamp does lose, Democrats need to find another pickup somewhere for a majority. They’d likely have to pin their hopes on either Phil Bredesen from Tennessee or Beto O’Rourke (D-TX), hoping one of them pulls off an impressive upset. (Both currently trail by 5 to 6 points, per RealClearPolitics.)

But if another Democratic incumbent were to lose as well (say, Missouri’s Claire McCaskill or Indiana’s Joe Donnelly, who are both in races that polls show are about tied), the party would probably have to make up for it with both Bredesen and O’Rourke winning. If three Democratic incumbents lose, that ends the party’s hopes for a majority, barring some total stunner elsewhere (such as in that Mississippi runoff that will likely be held at the end of November).

How some Senate polls have been off in recent years

Still, though the median outcome in FiveThirtyEight’s classic forecast is for a 51-49 Senate controlled by Republicans, their model does give Democrats about a one-in-five chance of taking over the chamber.

That’s largely because it’s not all that uncommon for polls to be off by 5 or 6 points in Senate races — the amount Bredesen and O’Rourke currently trail by. That can be because of undecided voters tending to break late for one candidate in a particular race or one party nationally, or because pollsters are wrongly modeling turnout, or for other reasons.

In 2012, Democratic Senate candidates outperformed their polls by 6 points or more in North Dakota, Connecticut, Florida, and Missouri. In 2014, Republicans did so in Kansas, West Virginia, Arkansas, Virginia, Kentucky, and Iowa. In 2016, Republicans did so in Wisconsin and Indiana.

A few of these races stand out for defying conventional wisdom. Heitkamp overcame a 5.7-point polling deficit to win in North Dakota in 2012. Sen. Mark Warner (D-VA) saw that his 8.9-point poll lead was illusory — on election night, he eked out a victory by less than 1 point. And in 2016, Sen. Ron Johnson (R-WI) outperformed the polls, which showed him losing, by 6 points.

Democrats do, then, have something to hope for. But one potential fear is that these polling errors could go in either direction. We don’t remember many of those other recent polling “misses” because most of them benefited the candidate who ended up winning anyway — they won by even more than they were expected to.

So if it were to be Republicans who substantially outperform their polls, things could look very grim for Democrats indeed. The GOP would hold on to all their seats and would have a strong chance of defeating six Democratic incumbents — perhaps even more. We’ll find out soon enough.