WASHINGTON - Anthony Rendon homered to spark a three-run seventh inning, and pinch-hitter Nate McLouth came through with a tiebreaking sacrifice fly as the Washington Nationals rallied past the Houston Astros 6-5 Wednesday night for a two-game sweep.

Washington extended its NL East lead to 1 1/2 games over Atlanta and Miami. The Nationals open a four-game series against the Braves on Thursday night in Washington.

Rendon led off the seventh against Josh Zeid with his 10th home run, cutting the deficit to 5-4.

Jayson Werth walked and went to third on Adam LaRoche's single off Darin Downs (1-1). Kyle Farnsworth came on to face Ryan Zimmerman, who grounded into a fielder's choice, beating the relay to first as Werth scored to tie it.

Ian Desmond then doubled Zimmerman to third. After Danny Espinosa was intentionally walked, McLouth's long fly to left field scored Zimmerman with the go-ahead run.

Aaron Barrett (3-0) got one out for the win and Rafael Soriano earned his 15th save.

Matt Dominguez drove in two runs for the Astros, who have lost three straight.

Rendon, a Houston native, is 9 for 18 against the Astros with seven RBIs.

For the second night in a row, neither starter made it past the fifth inning.

Astros right-hander Scott Feldman left after five innings with a 4-2 lead. He gave up six hits and three walks while striking out five.

Gio Gonzalez, activated Wednesday after missing 29 games due to left shoulder inflammation, pitched five innings, allowing four runs and five hits. He struck out six and walked three while throwing 93 pitches.

Gonzalez has allowed 16 earned runs over 12 1-3 innings in his last three starts, including his last two before going on the disabled list. His ERA climbed to 4.94, the highest it has been in June or later since 2009.

A replay review helped Washington take a 1-0 lead in the first.

Denard Span walked and was called out attempting to steal second. Nationals manager Matt Williams challenged the call, and after a replay review it was overturned.

Span then moved to third on an infield single by Rendon and scored on LaRoche's sacrifice fly.

In the third, Werth walked, stole second and scored on Desmond's single.

With Houston trailing 2-0 in the fourth, five straight Astros reached safely. After a walk and a hit batter, Jon Singleton singled to load the bases. With the count 2-1, Dominguez lined Gonzalez's fastball to left field for a two-run single.

Jason Castro followed with an RBI double and Jonathan Villar added a sacrifice fly to put Houston ahead 4-2.

The Nationals cut the deficit to one when Span's two-out double in the sixth scored Espinosa.

The Astros got it right back in the seventh. Robbie Grossman went from first to third on a single by Jose Altuve and scored on Ross Detwiler's wild pitch.

NOTES: The Nationals stole a season-high five bases, all in the first three innings. ... Houston RHP Brad Peacock (stomach virus) didn't make the trip to Washington and will rejoin the team Thursday when it opens a four-game series at Tampa Bay. ... RHP Jordan Zimmermann (5-3, 2.98 ERA) opposes Atlanta RHP Gavin Floyd (1-2, 2.98) in Thursday's series opener. ... Houston RHP Collin McHugh (4-4, 3.03) faces RHP Chris Archer (3-4, 3.40) on Thursday at Tampa Bay.