Updated

WASHINGTON (AP) — Wil Nieves drove in the go-ahead run with a double, Ivan Rodriguez added a sacrifice fly and the Washington Nationals came back to beat Colorado 6-4 Wednesday night, staying undefeated when their starting pitcher goes at least five innings.

Washington's John Lannan allowed four runs in six innings, enough to keep the team in the game. The Nationals are 8-0 when their starter goes at least five, 0-7 when he doesn't.

Reliever Tyler Clippard (3-0) struck out three in two scoreless innings, and closer Matt Capps worked a shaky ninth before earning his seventh save in seven chances.

The game was tied entering the eighth, when Rockies reliever Rafael Betancourt (0-1) allowed a leadoff single to Josh Willingham. After an intentional walk, Nieves lined a double to left-center.

Rodriguez then came up as a pinch-hitter and padded the lead before an announced crowd of 11,191, the tiniest in three seasons at Nationals Park. It was a tad smaller than the record-low 11,623 who showed up Monday.

One bit of bad news for Washington: All-Star third baseman Ryan Zimmerman left in the seventh inning after appearing to hurt his right hamstring while running out a double.

The Rockies — wearing black patches on their sleeves in memory of team president Keli McGregor, who died this week at age 48 — built a 3-0 lead, thanks in part to Brad Hawpe's third homer of the season.

Carlos Gonzalez tied a career high with four hits — all singles — including one leading off the game. Dexter Fowler followed with a double, and both eventually scored to make it 2-0. The Rockies then loaded the bases with two singles — one by Hawpe that clanged off Lannan's left leg — and a walk, but Clint Barmes flied out to center to end the inning. Lannan also took a shot off his right leg in the sixth.

Hawpe's solo shot over the wall in center made it a three-run lead in the third.

But the Nationals came right back to take the lead with four runs in the bottom half, thanks in large part to Adam Dunn's two-run double past sprawling first baseman Jason Giambi, Willingham's RBI single, and a fielding error on Barmes at second base that allowed Willingham to score.

Colorado tied it at 4-all on Gonzalez's run-scoring single in the fourth.

Capps had three strikeouts in the ninth, but he also made it a bit of an adventure, putting two men on base with two outs. But he caught pinch-hitter Ian Stewart looking at a final strike to end the game.

Rockies starter Jason Hammel was far more effective than in his previous start, when he lasted only 1 2-3 innings and allowed seven runs against Atlanta. This time, he went seven innings, giving up four runs — three earned — and eight hits.

NOTES: Nationals president Stan Kasten and GM Mike Rizzo made the two-hour drive to Harrisburg, Pa., to watch top prospect Stephen Strasburg throw five shutout innings in his third Double-A start Wednesday morning. Strasburg gave up one hit and struck out six, improving to 2-0 with a 0.73 ERA at Harrisburg. ... Giambi entered Wednesday 0 for 9 in 2010, and a second-inning strikeout made him 0 for 10, before his grounder to deep in the hole at shortstop in the fourth inning allowed him to beat the one-hop throw to first base for an infield single. ... Nationals manager Jim Riggleman got into an extended argument over a call of runner interference on Nyjer Morgan after there appeared to be contact between him and Giambi on a close play at first.