CLEVELAND (AP) — Justin Verlander gave up three runs in six innings for his 262nd victory and the AL West champion Houston Astros beat the Cleveland Guardians 4-3 on Saturday night. José Ramírez hit his 39th homer, stole his 41st base and drove in three runs for AL Central champion Cleveland, moving within one home run of becoming the seventh player in major league history with 40 home runs and 40 stolen bases in a season. Cleveland's loss clinched home-field advantage throughout the AL playoffs for the New York Yankees, who lost to the Pirates 9-4 on Saturday, while locking the Guardians into the second spot.

Both have first-round byes. Shawn Dubin worked a scoreless ninth for his second save. Houston will host either Detroit or Kansas City in the best-of-three AL Wild Card Series beginning Tuesday.

Verlander (5-6), who gave up seven hits and struck out five without issuing a walk, won for the second time in three starts and lowered his ERA to 5.48. It was the longest outing since May 29 for the right-hander, who was sidelined from June 18 until Aug.

21 with neck discomfort. The 41-year-old Verlander ranks 40th in career victories and would be part of the rotation if he is chosen for Houston’s postseason roster, manager Joe Espada said. “We have not had any conversation about Justin Verlander in any role other than a starter,” Espada said before the game.

“He’s done that his entire career and he’s done it at a very high level.” Zach Dezenzo had an RBI sin.