Updated

HOUSTON (AP) — Carlos Lee hit a two-run homer in the ninth off Matt Capps after the Astros tied it on Cristian Guzman's error in right field and Houston rallied for a 6-4 win over the Washington Nationals on Thursday.

Lee drove an 0-1 pitch into the left-field porch for the Astros' second win in their last at-bat in three days. On Tuesday, Lance Berkman hit a two-run single in the ninth to lift the Astros to an 8-7 win.

Michael Bourn started Thursday's comeback with a double to center. After Jeff Keppinger grounded out, Berkman drove a sinking liner that dropped at Guzman's feet and bounced away. Washington manager Jim Riggleman moved Guzman from shortstop to the outfield on a defensive switch an inning earlier.

Lee then hit his second two-run, game-ending homer of the season. He also hit one in the bottom of the ninth to lift Houston to a 4-2 win over Arizona on May 5.

Guzman gave the Nationals a 4-3 lead in the top of the ninth off Astros closer Matt Lindstrom.

Lindstrom (1-2) got the first two outs of the inning before pinch-hitter Mike Morse singled. Willie Harris then dropped a blooper just inside the left-field line, and the ball bounced past Lee and rolled toward the corner.

Guzman then singled to center and Washington took its first lead of the game. Capps (0-3) replaced Tyler Clippard and got Cory Sullivan on a groundout before the Astros rallied.

The Astros salvaged a solid effort by starter Brian Moehler, who allowed two runs on five hits in 5 1-3 innings. Moehler made his second start in place of Bud Norris, who's on the disabled list with bursitis and right biceps tendinitis.

Washington starter J.D. Martin allowed two runs on eight hits with four strikeouts. He may be the odd man out when the Nationals bring up 21-year-old phenom Stephen Strasburg to start Tuesday's game against Pittsburgh. Strasburg made his last minor-league start on Thursday, allowing no runs on three hits in five innings for Triple-A Syracuse.

Keppinger reached on Guzman's throwing error in the bottom of the first, the fourth error by a Washington shortstop in two games. Rookie Ian Desmond committed three in Wednesday's 5-1 loss.

Keppinger went to third on Berkman's single and scored on Lee's single. The Nationals have allowed an unearned run in nine straight games.

Kevin Cash homered into the left-field porch in the second, his first home run since 2008, when he played for Boston. Berkman drove another homer into the left-field seats in the third, his sixth of the season, to make it 3-0.

Ryan Zimmerman singled in the fourth and later came home on Josh Willingham's single up the middle. Zimmerman has scored 10 runs in his last six games.

Left-hander Tim Byrdak relieved Moehler with one out in the sixth and retired Adam Dunn. Casey Daigle, recalled from the minors on Tuesday, replaced Byrdak and Roger Bernadina drove in a run with a single to cut Houston's lead to 3-2.

Drew Storen relieved Martin with two outs in the sixth after Martin threw 103 pitches.

The Nationals grounded into inning-ending double plays in the seventh and eighth, against Jeff Fulchino and then set-up man Brandon Lyon. Lyon has not allowed a run in 21 of 25 appearances this season.

NOTES: The Astros are 13-1 when leading after seven innings. ... Nationals manager Jim Riggleman said left-hander Scott Olsen will probably make a rehab start next week. ... Nationals 1B Adam Dunn said he hadn't talked to former teammate and close friend Ken Griffey Jr. since Griffey announced his retirement on Wednesday. Dunn and Griffey played together in Cincinnati from 2001-07. "He was the greatest player in the game, and I was just a little peon," Dunn said. "But it didn't matter who you were. He was always happy to help you. He just fit in with everyone. He wasn't your typical superstar. He was an awesome teammate."