In the final weeks of the midterm campaign, the Democratic Party has seen openings in a handful of districts that seemed out of reach, causing outside groups from both sides to race in at the last minute to try to tip things in their candidate’s favor.

In these races, almost no outside money had been spent until they tightened at the very end, according to a review of campaign finance reports.

Republicans are on the defensive this year, and infusing cash to save or take GOP-held seats in comfortably red districts has mostly not been a priority. For Democratic-leaning groups, throwing money into these races is a Hail Mary pass at the end of a game — worth the shot even if the odds are still long.

If these seats do flip, it is likely to be a very good night for Democrats. Let’s run through where they are.

Colorado 6th

Texas 32nd

Coffman (R)* vs. Crow (D)

Sessions (R)* vs. Allred (D)

$16.1 million

$14.2 million

Lean D

Toss-up (R-held)

$10.4M D

10M

$8.35M D

5M

$5.67M R

$5.89M R

0M

SEPT.

NOV.

NOV.

SEPT.

Virginia 5th

Pennsylvania 10th

Riggleman (R)* vs.

Cockburn (D)

Perry (R)* vs. Scott (D)

$2.8 million

$2.4 million

Toss-up (R-held)

Lean R

5M

$1.71M R

$1.66M R

$679K D

$1.15M D

0M

SEPT.

NOV.

NOV.

SEPT.

* Incumbent

Full graphic: wapo.st/outspent

Colorado 6th

Texas 32nd

Coffman (R)* vs. Crow (D)

Sessions (R)* vs. Allred (D)

$16.1 million

$14.2 million

Lean D

Toss-up (R-held)

$10.4M D

10M

10M

$8.35M D

5M

5M

$5.67M R

$5.89M R

0M

0M

SEPT.

NOV.

SEPT.

NOV.

Virginia 5th

Pennsylvania 10th

Riggleman (R)* vs. Cockburn (D)

Perry (R)* vs. Scott (D)

$2.4 million

$2.8 million

Toss-up (R-held)

Lean R

5M

5M

$1.71M R

$1.66M R

$679K D

$1.15M D

0M

0M

SEPT.

NOV.

SEPT.

NOV.

* Incumbent

Full graphic: wapo.st/outspent

Colorado 6th

Texas 32nd

Coffman (R)* vs. Crow (D)

Sessions (R)* vs. Allred (D)

$16.1 million

$14.2 million

Lean D

Toss-up (R-held)

$10.4M D

10M

10M

$8.35M D

$5.67M R

$5.89M R

5M

5M

0M

0M

SEPT.

NOV.

SEPT.

NOV.

Virginia 5th

Pennsylvania 10th

Riggleman (R)* vs. Cockburn (D)

Perry (R)* vs. Scott (D)

$2.4 million

$2.8 million

Toss-up (R-held)

Lean R

5M

5M

$1.66M R

$1.71M R

$1.15M D

0M

0M

$679K D

SEPT.

NOV.

SEPT.

NOV.

* Incumbent

Full graphic: wapo.st/outspent

Colorado 6th

Texas 32nd

Pennsylvania 10th

Virginia 5th

Coffman (R)* vs. Crow (D)

Sessions (R)* vs. Allred (D)

Perry (R)* vs. Scott (D)

Riggleman (R)* vs.

Cockburn (D)

$16.1 million

$14.2 million

$2.8 million

$2.4 million

Lean D

Toss-up (R-held)

Toss-up (R-held)

Lean R

$10.4M D

10M

$8.35M D

5M

$5.89M R

$5.67M R

$1.71M R

$1.66M R

$1.15M D

$679K D

0M

SEPT.

NOV.

SEPT.

NOV.

SEPT.

NOV.

SEPT.

NOV.

* Incumbent

Full graphic: wapo.st/outspent

Pennsylvania’s 10th District

On Monday, the day before the election, the Cook Political Report moved Pennsylvania’s 10th Congressional District from lean Republican to a toss-up. Rep. Scott Perry (R), who has closely aligned himself with President Trump, is in a tighter-than-expected race against Democrat George Scott in a newly drawn district that, although still conservative, includes some purplish-blue areas. (Pennsylvania had to redraw its electoral map after a judge ruled that its district lines had been drawn for overt political gain.)

Outside groups had spent about $400,000 on that race by mid-October. But sensing they could lose this reliable Republican seat, or in the Democrat’s case, could win it, groups jumped in with a total of $2.1 million in the last weeks of the campaign to support and oppose Scott.

Virginia’s 5th District

A similar dynamic occurred in Virginia’s 5th Congressional District in the race to replace outgoing Rep. Thomas Garrett (R). Outside groups have spent $2.3 million, with $2.1 million of it coming at the tail end. A GOP leadership super PAC hurriedly went up on television for political newcomer Denver Riggleman when it became clear that the district — which Trump won by double digits — could not be taken for granted.

His opponent, Leslie Cockburn, was an investigative reporter and documentary filmmaker and is the mother of actress Olivia Wilde, which probably explains why Cockburn received $36,988 from the entertainment industry during the campaign.

Colorado’s 6th District

Another significant shift in resources occurred in races that broke late for Democrats and where Republican groups decided to bow out and use their money elsewhere.

In Colorado’s 6th District, the Congressional Leadership Fund, a super PAC aligned with the House GOP leadership, announced in late September that it was canceling $1 million worth of ad buys in support of Rep. Mike Coffman’s reelection, plateauing the spending in the district for the Republican. About the same time, Democratic-leaning outside groups increased their spending by more than $2 million. In all, the groups supporting Democratic candidate Jason Crow have spent $10.4 million in the general-election campaign.

Texas’s 32nd District

In Texas’s 32nd District, Democratic groups started spending at a faster clip in the last week of October, going big and dropping more than $2.2 million in the final few days to try to unseat Rep. Pete Sessions (R). Republican groups, on the other hand, have nearly stopped spending since Oct. 28.

With record turnout already in Texas, Sessions could also be hurt by the enthusiasm generated by Democratic Rep. Beto O’Rourke, who is trying to unseat Sen. Ted Cruz (R).

Alaska’s at-large House district

The clearest example of a late push is actually the inverse of the overall trend.

Rep. Don Young (R) has held the job since 1973 and at 85 is the longest-serving member of the chamber, giving him the distinction of dean of the House. A fixture in the state, for most of his career he has won by double-digit margins. And yet this year, late polling suggested that the race was much closer than previously thought, so outside groups rushed in with their checkbooks. Young is one Republican who benefited more than his opponent from last-minute spending.

Before Oct. 15, there had been no outside money in Alaska’s House race. But since then, independent groups have spent about $84,000, of which $75,000 came from the Congressional Leadership Fund in opposition to Alyse Galvin.

Meanwhile, Galvin, a registered independent who ran in the Democratic primary, has received only about $7,900 in support from outside groups, and most of that came from Planned Parenthood.

Want to dig in more to spending in this campaign? Check out this interactive graphic that tracks the spending of outside groups in the most competitive and costly races in the country.