Updated

Juan Nicasio was dodging trouble for much of the night until it caught up with him in one bad inning.

Nicasio gave up four straight hits to touch off a six-run sixth inning by Houston, and the Astros overtook the Colorado Rockies 7-5 on Thursday night to sweep the two-game series at Coors Field. It was the first series sweep by the Astros this season.

"I thought Juan had to work hard throughout the game," Rockies manager Walt Weiss said. "I felt like he was working hard, and then in that sixth, I felt like he was really grinding."

Nicasio (4-2) went into the sixth with a 3-1 lead, and then gave up four of the seven hits he allowed without recording an out.

J.D. Martinez, who had a career-high four hits, and Carlos Pena had successive run-scoring singles to tie the game at 3-all before Nicasio was relieved by Wilton Lopez. He promptly served up consecutive home runs to Chris Carter and Matt Dominguez as the Astros surged in front 7-3.

"First of all, I give a lot of credit to (Nicasio) because he didn't have his best stuff but he kept us in the game for the first five innings," Rockies catcher Yorvit Torrealba said. "In the sixth, he had a little bit of bad luck with the chopper by Pena. But other than that, I don't think he was able to make his pitches."

Lucas Harrell (4-6) allowed four runs — three earned — in 5 2-3 innings to pick up his first win since beating the Yankees on April 29.

Hector Ambriz got his first save.

It was the second time this season the Astros have hit back-to-back home runs — Carter had a three-run drive and Dominguez had a solo shot — and the six-run inning matched Houston's season high for one frame.

The Rockies lost for the fifth time in six games.

"That's a big league ball club over there and they played better than we did," Torrealba said. "They were able to get big hits and we didn't. Now we've got to move on and hopefully play good baseball against the Dodgers."

Carlos Gonzalez's RBI single in the bottom of the sixth made it 7-4, and Todd Helton's sacrifice fly in the ninth made it a two-run game. Nolan Arenado struck out looking with a man on to end it.

Gonzalez reached four times for and stole three bases for Colorado, which couldn't manufacture a late-game comeback. The Rockies are now 15-22 since starting the season 13-4 and fell to third place in the NL West.

Harrell survived a rough start and limited the damage despite a season-high four errors by his defense.

Colorado couldn't take advantage of the poor fielding. They managed singled runs in each of the first three innings to take a 3-0 lead but left the bases loaded in the second and third.

"I felt like we had an opportunity to put the game away early," Weiss said. "We didn't do it and it cost us. That's happened to us a few times this year. You have a team in trouble, or the starter in trouble, you need to put them away and win those games."

Troy Tulowitzki, who had two homers Wednesday night, flew out to end the second and Dexter Fowler hit into an inning-ending double play in the third.

NOTES: Rockies LHP Jeff Francis (groin) is schedule for his first rehab start Monday in Salt Lake City. He will throw 70-75 pitches and if all goes well will have a second start June 8 in Reno. ... Colorado's Jon Garland (3-6) will face Clayton Kershaw (5-3) in the first game against the Dodgers on Friday. ... Michael Cuddyer, who was 2 of 5 with an RBI, had his third straight multihit game.