SEATTLE (AP) -- Cole Hamels shook off a line drive that deflected off his jaw, and the Texas Rangers homered four times to beat the Seattle Mariners 9-6 Tuesday night.
Hamels pitched seven innings to help Texas move within one game of first-place Houston in the AL West. The Astros lost 4-0 at Oakland.
Mitch Moreland, Shin-Soo Choo and Rougned Odor connected off Mariners starter Taijuan Walker, who lasted just three innings. Joey Gallo went deep in the eighth.
With two runners aboard in the third, Jesus Sucre lined a 1-0 pitch straight back to the pitcher's mound. Hamels (3-1) managed to deflect the ball with his glove before it slammed into his left cheek, causing the left-hander to stumble and fall to the ground.
After being checked by the Rangers' staff, Hamels remained in the game and got out of the jam with just one run allowed on a fielder's choice by Kyle Seager. Hamels, acquired from Philadelphia in late July, gave up four runs on eight hits and improved to 9-8 overall.
Shawn Tolleson earned his 31st save.
Walker (10-8) yielded six runs, five earned, and six hits.
Moreland's solo home run gave Texas the lead in the second. A three-run drive by Choo extended it to 4-0 in the third. Seattle got a run back on Seager's fielder's choice in the bottom half.
After Elvis Andrus reached on an error, Odor homered to give Texas a 6-1 lead.
Jesus Montero singled home Mark Trumbo, and Shawn O'Malley's sacrifice fly scored Logan Morrison for Seattle. An RBI groundout from Ketel Marte drove in Montero to close the gap to 7-4.
Gallo homered off Tony Zych to extend the Texas lead to 8-4.
Stefen Romero drew a nine-pitch walk from Rangers reliever Jake Diekman. Robinson Cano followed with a two-run homer to center field to close the deficit to 8-6 in the eighth.
Rangers: OF Delino DeShields is day to day after leaving Monday's game with a mild left knee sprain. He was not available. Will Venable started in place of DeShields in center field.
Mariners: LHP James Paxton (3-3, 3.70 ERA) is a strong candidate to start Sunday against Colorado. Paxton has been on the disabled list since May 29 with a strained left middle finger. He partially tore his nail on the same finger during a rehab start last week that set the process back. If all goes well in a bullpen session Thursday, he could be activated Sunday.
Rangers: LHP Martin Perez (2-4, 5.07 ERA) has allowed three earned runs or fewer in eight of his nine starts for Texas since joining the rotation July 17. Perez got a no-decision after tossing six innings with just two earned runs in an 11-3 Rangers victory over the Mariners on Aug. 8.
Mariners: LHP Vidal Nuno (0-2, 3.72) will get a spot start for Seattle in the third game of the four-game series. Nuno will make his sixth start of the year for the Mariners. He's made 26 appearances for Seattle, most coming out of the bullpen, since being acquired from Arizona on June 3.