Updated

Houston, TX (SportsNetwork.com) - Two-run homers from Chris Carter and Colby Rasmus backed six solid innings from Roberto Hernandez in the Houston Astros' 6-4 triumph over the Oakland Athletics at Minute Maid Park.

Hernandez (2-3) scattered seven hits and allowed two runs to end a three-start winless stretch and get the Astros back in the victory column. The AL West leaders had won five straight prior to a 2-1 loss to the A's in Monday's opener of this three-game set.

The right-hander received support from Carter and Evan Gattis, who had an RBI single among his two hits. Rasmus also went 2-for-4 and provided some cushion with his blast in the eighth inning, during which Jason Castro added a solo shot for Houston.

Carter's homer came off Sonny Gray (4-2), who labored through a season-low five innings and was reached for three runs on seven hits and three walks.

"Yeah stuff was OK, fastball wasn't great," Gray said. "Left a few balls up and that was it."

Oakland again failed to win back-to-back games, something it's achieved only once this season. The A's have now dropped 11 of 13.

Carter put the Astros ahead to stay when he clubbed Gray's full-count pitch over the wall in left with Rasmus aboard in the second inning. Oakland had a pair of runners thrown out at the plate during the top of the frame, as Max Muncy was cut down on a strong relay throw from Jonathan Villar while attempting to score on a Brett Lawrie double. Lawrie was later tagged out trying to cross from second when Sam Fuld legged out an infield hit.

The Athletics did get a man home in the third when Marcus Semien's two-out single off Hernandez was followed by Josh Reddick's double to left.

Hernandez bounced back with two straight sharp innings before Gray got into trouble in the fifth. Consecutive walks to Luis Valbuena and George Springer set up Gattis' single to left that extended the margin to 3-1.

"It's an honor, I guess you want to say, and it's humbling to go out here and play on the heels of those guys, and it's big shoes to fill. But for us, it's fun going out, and you just have to keep competing and take it one day a time," said Springer on the team's 26-14 start.

Muncy pulled Oakland back within one with a solo homer off Hernandez in the sixth. However, Houston used its power to put the contest out of reach in the eighth.

Rasmus drilled Fernando Abad's offering into the seats in right with one on, and Castro connected off the lefty two batters later to increase the lead to 6-2.

Those homers proved significant, as Oakland rallied with Luke Gregerson on the mound in the ninth.

The Astros closer walked Stephen Vogt to begin the inning and yielded a double to Muncy before Lawrie singled in a run. Gregerson rebounded to get Mark Canha to hit into a double play in which Muncy scored, but walked Eric Sogard to bring the tying run to the plate.

Pat Neshek was then summoned and fanned Billy Burns on three pitches to record a one-out save.

Game Notes

Oakland outfielder Coco Crisp left the game in the bottom of the fourth inning due to tightness in his neck ... Lawrie finished 3-for-4 and Muncy and Burns collected two hits each for the A's ... Carter's homer was just the second allowed by Gray this season and the first permitted by an Oakland starter in 12 games ... Hernandez has now pitched at least six innings in seven consecutive starts, his longest streak since a nine-game run with Cleveland in 2011.