WASHINGTON — The Chicago Cubs win whenever they need to, with whatever it takes, even a seven-out save by Wade Davis to preserve a shrinking lead and a "Did that really happen?" four-run inning against Washington's Max Scherzer in a thriller of a Game 5.

That wild, bat-around fifth inning Thursday night for Chicago included Addison Russell's go-ahead two-run double, a bases-loaded hit-by-pitch, and a disputed dropped third strike followed by a throwing error, helping the defending World Series champion Cubs come back — and then hold on — to edge the Nationals 9-8 and reach the NL Championship Series for the third year in a row.

Russell drove in a total of four runs, and Davis, Chicago's seventh pitcher, turned in his longest appearance since 2012. The Cubs trailed 4-1, then led 8-4 and 9-6, in a game that lasted more than 4 1/2 hours and ended after midnight on Friday.

Catcher Willson Contreras picked off Jose Lobaton at first base to quash a Washington threat in the eighth and Davis fanned a swinging Bryce Harper for the final out.

Chicago, which surpassed its total of eight runs in the first four games of the NL Division Series, advanced to face the Los Angeles Dodgers, who will start ace Clayton Kershaw at home in Game 1 of the NLCS on Saturday night.

For manager Joe Maddon and the Cubs, this was their fourth consecutive victory in a win-or-be-eliminated post-season game. That includes three straight to end the 2016 World Series, when Chicago trailed the Cleveland Indians 3-1 before forcing a Game 7 won by the Cubs in 10 innings.

The Nationals, meanwhile, went one-and-done yet again: This is the fourth time in the past six years that the club won the NL East and immediately lost its opening playoff series. And this is the third time in that span that Washington bowed out with a Game 5 NLDS loss at home; that also happened in 2012 against the St. Louis Cardinals and last year against the Dodgers.

This one was played exactly five years to the day after the decider against the Cardinals, which the Nationals lost 9-7 in Washington. Just like that night, the Nationals started Gio Gonzalez. Just like that night, Washington raced out to an early lead (6-0 back then). And just like that night, Gonzalez had control problems and started giving back some of the edge.

Homers by Daniel Murphy and Michael A. Taylor — whose grand slam off Davis backed Stephen Strasburg's 12-strikeout masterpiece in Washington's 5-0 victory in Game 4 at Wrigley Field on Wednesday — gave the hosts a 4-1 lead in the second against Cubs starter Kyle Hendricks.

But Gonzalez gave back two of those runs, so it was 4-3 as two-time Cy Young Award winner Scherzer entered for the fifth. He started Game 3 of this series, pushed back because of an injured right hamstring, and hadn't come out of the bullpen since 2013 with the Detroit Tigers.

By the time Scherzer's one inning was over, the Cubs had taken a 7-4 lead. They scored two earned runs and two unearned runs, on the strength of three hits, one hit by pitch, one intentional walk, a catcher's interference, and one very odd play.

What could have been a potentially inning-ending strikeout turned into a run, as Javier Baez swung and missed, but the ball went under catcher Matt Wieters' glove and through his legs. When Wieters collected the ball, he threw it into right field for an error, then appeared to argue that the play should have been ruled over because Baez's follow-through carried the bat into the catcher's mask.

Russell made it 8-4 in the sixth on an RBI double when left fielder Jayson Werth tried to make a sliding catch but whiffed. The lead was 9-6 when Washington got one run in the seventh on Harper's sacrifice fly, and one in the eighth on Taylor's RBI single.

But the Nationals wasted some opportunities. In the eighth, with two on and no outs, pinch-hitter Adam Lind hit into a double play. Later in that inning, again with two men aboard, Lobaton was nailed by Contreras' snap throw for the third out — Lobaton was originally ruled safe, a call that was overturned on replay.

In the seventh, Ryan Zimmerman was up as the go-ahead run with two men on, but Davis struck him out. That was part of an 0 for 4, three-K night for the first baseman who had a resurgent season, leading the Nationals with 36 homers and 108 RBIs.

That season is over for him and his team. The Cubs, though, will play on.