HOUSTON (AP) — Carlos Gomez had three RBIs and finished a home run shy of the cycle and Luis Valbuena hit a tiebreaking two-run homer in the eighth inning to help the Houston Astros sweep the Seattle Mariners with a 9-8 victory Wednesday night.

The game was tied at 7 with one on and one out when Valbuena launched a towering shot off Edwin Diaz (0-2) to the second deck in right field for his second straight game with a homer.

Ken Giles (1-3) struck out two in a scoreless eighth for the win. Luke Gregerson allowed an RBI double to Robinson Cano with one out in the ninth before striking out Dae-Ho Lee with the bases loaded for his 14th save.

Houston led by five runs early before Cano, Kyle Seager and Lee all homered in the fourth inning to cut the lead 5-4. The Astros stretched the lead to 7-4 with a two-run sixth before a three-run homer by Seth Smith tied it in the seventh.