HOUSTON (AP) -- Brad Hand knows he has to prove he belongs in Miami's rotation. His last five starts might be making the decision easier.
Hand struck out four and walked two in a career-high 7 1-3 innings to earn his second straight win.
''Nothing's done yet,'' Hand said. ''I am still trying to go out every fifth day and solidify myself in this rotation. Nothing is going to be given to me or anything. I'm going to have to prove it every fifth day.''
Hand (2-2) cruised through the first five innings, allowing just two baserunners, and retired seven of his first eight batters. Chris Carter reached on a walk in the first and Gregorio Petit singled with one out in the third.
''We stuck with the game plan right out of the shoot,'' Hand said. ''We were able to get ahead of the guys. I was trying to get easy, quick outs and groundball outs.''
Hand's previous career high for innings pitched was Sunday against San Francisco when he allowed two runs in seven innings.
He said he doesn't know what's changed for him other than throwing strikes.
''You guys have seen it: When I walk guys, get behind in the count, that's when I get myself in trouble,'' he said. ''The biggest thing for me is to focus and pound the strike zone and make them put the ball in play.''
Hand continued a string of solid starts since transitioning from the bullpen to the rotation at the beginning of July. He has yielded three runs or fewer in each of his five starts.
''That was a tremendous effort by Brad tonight,'' Marlins manager Mike Redmond said. ''He was pounding the strike zone and was in complete control of that game. ... It was fun watching him pitch. He and Matty (Mathis) seemed to be on the same page the whole night and flipped in some nice breaking balls and changeups and ran that fastball in and out.''
Donovan Solano and Giancarlo Stanton each had two hits for the Marlins, who won their fifth in sixth games.
Miami was able to get to Dallas Keuchel (9-7) in the seventh.
Jarrod Saltalamacchia reached on an error by center fielder Enrique Hernandez. Adeiny Hechavarria hit an infield single with two outs before Mathis drove in both runners with a double.
''I was frustrated earlier,'' said Mathis, who grounded into an inning-ending double play in the fifth. ''I had a chance to push a run across and was not able to do it. Brad kept us in the game. I had another opportunity, and luckily, got it done.''
Bryan Morris got two outs in the eighth, and Steve Cishek pitched a perfect ninth for his 25th save.
Keuchel, who had given up four runs or more in each of his last five starts, allowed two runs - none earned - and nine hits with seven strikeouts in seven innings.
''I definitely need to be a little bit better,'' he said. ''I don't think I lost it, I just think it was some bad breaks. I think I've pitched well, just the results haven't been there.''
The left-hander retired nine of the first 10 batters he faced but ran into trouble in the fifth and sixth, allowing the first two batters to reach in both innings. Houston's defense helped him out both times, turning double plays in each inning.
''If you look at the way he pitched tonight, he deserves to fare better,'' Astros manager Bo Porter said. ''Defensively, we did let him down. We gave them extra outs that extended the inning and allowed them the two runs they got.''
Houston, which has lost three straight to fall a season-high 19 games under .500, did not get a runner past second base. Carter reached second in the first, and Jason Castro doubled in the eighth to chase Hand.
NOTES: Miami recalled catcher J.T. Realmuto from Double-A Jacksonville and optioned right-hander Anthony DeSclafani to Triple-A New Orleans. ... Houston selected the contract of Petit, an infielder, from Triple-A Oklahoma City. He started at shortstop. The Astros optioned right-hander Anthony Bass to Oklahoma City after Thursday's game. ... Houston also transferred right-hander Matt Albers to the 60-day disabled list. ... Miami challenged the original safe call on Jose Altuve's attempted stolen base in the sixth. After review, the call was overturned and Altuve was out.