ARLINGTON (AP) — Dallas Keuchel took a shutout into the sixth inning, Jose Altuve homered and the AL-leading Houston Astros stopped their longest losing streak of the season at five games, beating the Texas Rangers 2-1 on Sunday.

Carlos Beltran had a tiebreaking RBI single in the seventh. Adrian Beltre’s 12th homer of the season and 3,014th career hit had pulled the Rangers even at 1 in the sixth.

Keuchel (10-2) struck out seven in 6 2/3 innings for his first win since June 2 against the Rangers, just before his nearly two-month stint on the disabled list. This was the 2015 AL Cy Young Award winner’s fourth start since his second trip to the DL for neck soreness.

Keuchel had lost two in row, that skid coming after a career-best 11-game winning streak going back to last season.

It just the third win in 12 games in August for the AL West-leading Astros.

Joey Gallo lined into an inning-ending double play with runners at second and third in the Texas eighth against Ken Giles. First baseman Yuli Gurriel caught Gallo’s smash and threw to second behind Drew Robinson, who was running for Beltre.

Giles struck two in the ninth for his 23rd save.

Altuve’s 17th home run came in the fourth off Andrew Cashner (7-9), the Houston-area native who was scratched from his previous scheduled start at the New York Mets because of neck stiffness. The right-hander went seven innings as a three-game winning streak that matched a career best came to an end.

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)