Updated

Arlington, TX (SportsNetwork.com) - Jon Singleton's three-run homer helped the Houston Astros take a 12-7 victory over the Texas Rangers in the opener of a three-game set on Monday.

Singleton finished 3-for-4 with four RBI and two runs scored, Marwin Gonzalez drove in three runs and Alex Presley also homered for the Astros, who used a season-high 17 hits to snap a seven-game skid.

"I was just really focused on seeing the ball tonight," said Singleton. "Tonight, we played better."

Starter Jarred Cosart (9-6) earned the win despite allowing six runs -- five earned -- on nine hits and two walks with two strikeouts over five innings.

Elvis Andrus brought home three runs and Adrian Beltre homered and drove in two for Texas, which has lost eight of its last nine games.

"They never stopped fighting ... just couldn't stop them," Rangers manager Ron Washington said.

Miles Mikolas (0-1) lost his second major league start after giving up nine runs on 12 hits across 3 1/3 frames.

Houston opened the scoring with a six-run second inning. Singleton, Matt Dominguez and Chris Carter all singled to load the bases before Carlos Corporan and Enrique Hernandez both stroked RBI singles.

Gonzalez then cleared the bases with a triple to center and came home on Presley's base hit up the middle two batters later for a 6-0 advantage.

The Rangers got one back in the home half. Leonys Martin took a one-out walk and Carlos Pena singled two batters later. Martin scored after Rougned Odor's grounder bounced off the glove of the first baseman Singleton, who was charged with an error.

Consecutive doubles from Alex Rios and Beltre in the third made it a 6-2 game.

Singleton added to the Astros' lead in the fourth with a three-run blast to right-center field.

The Rangers answered with three runs in the home half. Robinson Chirinos and Odor both singled and Shin-Soo Choo walked to load the bases before Andrus cleared them with a double to left, making it a 9-5 game.

Beltre led off the bottom of the fifth with a solo blast to center, but Presley countered with solo shot of his own for the Astros in the sixth.

Gonzalez walked and Jose Altuve singled to place runners at the corners in the eighth. Altuve stole second before pinch-hitter L.J. Hoes' sac fly scored Gonzalez and Singleton's double brought home Altuve, making it a 12-6 game.

Rios' RBI single off Jose Veras in the ninth accounted for the final score.

Game Notes

Altuve, who was named to his second All-Star game on Sunday, surpassed Bob Watson with 124 hits to set the franchise record for hits before the All-Star break ... Houston's 12 runs were the second-most scored by the team this year. The most was in a 14-5 win over Minnesota on June 8 ... Astros relievers Josh Fields and Tony Sipp each struck out three batters for six straight strikeouts across the sixth, seventh and eighth innings ... Beltre extended his hitting streak to 11 games ... Presley left the game after fouling a ball in the eighth.