It was all tied up at 1-1 in the bottom of the eighth on Wednesday afternoon before Stephen Drew sent a pinch hit home run to right field in Nationals Park to put the Nats ahead. Washington's lead didn't last long.
With closer Jonathan Papelbon on the DL, Dusty Baker turned to right-hander Matt Belisle in the top of the ninth with Kris Bryant due up for the Cubs.
Bryant doubled to start the inning, so Baker turned to left-handed reliever Oliver Perez, who gave up a two-run home run to right by Anthony Rizzo that put Chicago up, 3-2.
Washington's Nationals weren't done, however. Bryce Harper walked to start the home-half of the ninth and Wilson Ramos came through with a two-out RBI single that drove him in and tied things up at 3-3.
It went to extras, but in the top of the twelfth, the Cubs went ahead again with Addison Russell driving in a run with a one-out grounder to center, 4-3, but in the bottom of the tenth inning, the Nationals rallied again.
Danny Espinosa was hit by Trevor Cahill with one down and he stole second base with Michael A. Taylor at the plate before Taylor drove him in with a liner to center, 4-4.
One out later, Jayson Werth stepped in and hit a 1-0 fastball off Nationals Park's right-center field wall for a walk-off winner that scored Taylor from first. It was Werth's second walk-off winner on the homestand.
"The guy is a clutch man," Dusty Baker told reporters after the win, when asked what he's learned about Werth in their time together in the nation's capital.
"He's a big-game guy. He's been that since he's been here. That's what I learned about Jayson. He wants to be in that situation.
"And every time he comes through that makes it easier in his mind and our mind for him to come through in the future."
"He's been here for some time and he's definitely the leader in the clubhouse," Stephen Strasburg said, after putting together another solid start against the Cubs on Sunday.
"To see him come through again in such a short span is just awesome."
The back-and-forth battle in the series finale with the Cubs reinforced Baker's thinking when it comes to his team.
"They've showed me that they don't quit and an adverse event doesn't take away their spirit," Baker said.
"Kept fighting and fighting. We made moves and they made moves, they came through. After that [Rizzo] home run we could have been deflated, but without Pap we're kind of bullpen-by-committee, and we were trying to get one out with Belisle and then go to Perez and if we had to after that go to [Shawn] Kelley.
"It didn't work because the last thing we expected was for [Rizzo] to hit a home run off Perez, because he's hit one home run off of him, but he's handled him pretty good."
"They got some clutch hits, we got some clutch hits, and that was a clutch stolen base by Danny after getting hit by the pitch, and then Michael Taylor got a big base hit and I was trying to decide who we were going to take out of the game and decided, hey, man, I wasn't going to take Jayson out because late in the game this guy's a clutch man, so things worked out for us."
It was a nice way for the Nationals' skipper to celebrate his 67th birthday.
"Especially today, getaway day against the Cubs and that was a heck of a birthday present," Baker told reporters, "because I think I've lost like ten years in a row on my birthday, you can look it up.
"It's not a very good record on my birthday and so that was a heck of a birthday present, one of the best birthdays I've ever had."
Baker was out of the game on his birthday last season.
In his postgame interview after last night's win, a reporter asked him where he was?
"I think I was in Canada fishing," Baker said.
So this was a much better way to spend his birthday of course?
"Canada is pretty nice though," Baker said.