WASHINGTON -- The game got off to a bad start for Javier Baez.
The acrobatic Cubs shortstop fanned in his first three at-bats against Washington starter Gio Gonzalez. However, Baez singled in the eighth inning and had an RBI double in the ninth as Chicago held on for a 5-4 win on Monday night despite four runs in the bottom of the ninth by the Nationals.
"I have been working and working. Finally, it is paying off," said Baez, who has hit safely in eight games in a row and is 13-for-31 (.419) during that stretch.
Baez also made several nice defensive plays, robbing Bryce Harper of a single and making a diving catch in foul territory in the eighth.
The winning pitcher was Eddie Butler, a Virginia native who was playing in front of his mother, brother and a college teammate from Radford University.
"We had a really good game plan," said Butler, who threw five scoreless innings. "Javy was making plays all over the field. The guys were making great plays to keep us in that situation (with the lead). It was intense. Sometimes I felt myself speed up a little bit."
"Well, you know, I mean, as long you got outs, you got a chance, that's how I look at it," Nationals manager Dusty Baker said. "Especially with the offense we have, you don't know when and who they're going to erupt against.
"The fact that we had action on winning that game, we were a hit away from winning that game, and our guys didn't quit. It was a great comeback, and you never know in the eighth which run is going to beat you. It was tough to take and especially when we had a chance to come back -- and a chance to come back all the way."
Willson Contreras led off the game with a homer for the Cubs.
Butler (4-2) was lifted for pinch hitter Addison Russell in the top of the sixth. Russell struck out with two runners on base to end the inning with the Cubs ahead 1-0.
Chicago reliever Carl Edwards Jr. fanned all three batters he faced in the sixth. Pedro Strop threw a scoreless seventh. Koji Uehara, Brian Duensing and Justin Grimm handled the eighth, and Hector Rondon and Davis pitched the ninth, the latter two allowing two runs apiece.
"Unique the way it played out," Cubs manager Joe Maddon said. "Javy had a wonderful game all the way around."
Chicago got an insurance run in the eighth when the Washington defense fell apart, and the Cubs added three runs in the ninth.
Jeimer Candelario reached on a fielder's choice in the eighth when Washington second baseman Daniel Murphy was late with a relay throw on the lead runner at second. Baez, ruled safe on the video review, then stole third and scored on a squeeze bunt by Albert Almora Jr. to give the Cubs a 2-0 lead.
Anthony Rizzo and Ian Happ had RBI singles in the ninth against Matt Grace, and Baez (two hits) hit an RBI double for a 5-0 cushion.
Gonzalez (7-2) gave up one run and two hits in six innings. He walked five and fanned eight.
The Cubs (39-37) are 17-21 on the road, while the Nationals (45-31) are 20-16 at home.
Contreras also had two hits for the Cubs, and Harper had three hits and Michael A. Taylor two for the Nationals.
Contreras gave the Cubs the lead with a leadoff homer in the first inning. It was the first time he batted leadoff at any level of pro ball.
Baez made a highlight-reel catch at short as he speared a line drive off the bat of Harper to end the third inning. Harper singled in the first after he had walked 13 times in a four-game series against the Cubs in May 2016.
"Every hitter was battling," Baker said. "We got a big pinch-hit from Drew; nobody wanted to make the last out, and they made some outstanding defensive plays against us and especially Javy made a couple outstanding plays.
"We did make a couple plays that cost us some runs. We've got to tighten up our defense like I told you the other day, because making an error or two a game is not going to really get it."
NOTES: Cubs 3B Jeimer Candelario (1-for-4) was called up from Triple-A Iowa to start. To make room on the roster, RHP Dylan Floro was sent to Iowa. ... Cubs INF Addison Russell was not in the starting lineup, a day after he left the game in Miami with a sore shoulder. On Monday, he exited after fanning as a pinch hitter in the sixth inning. ... Washington LF Jayson Werth, who has been on the disabled list since June 5 with a left foot contusion, may not return until after the All-Star break, according to manager Dusty Baker.