MINNEAPOLIS (AP) — Cole Hamels was knocked out in the fifth inning of his shortest start this season and lost for the first time since May 27 as the last-place Minnesota Twins beat the first-place Texas Rangers for the second consecutive day, 5-4 on Sunday.

Brian Dozier drove in two runs and scored a pair to back Kyle Gibson (2-5), who won his second straight start after going winless in his first seven.

Hamels (9-2) allowed five runs and 10 hits while walking three, leaving after walking his first two batters in the fifth. Hamels had won a Rangers record nine consecutive road decisions.

Gibson gave up four runs — two earned — and five hits in 6 2/3 innings with six strikeouts. Brandon Kintzler pitched around Robinson Chirinos' two-out double in the ninth for his fourth save in as many chances, retiring Shin-Soo Choo on a game-ending groundout.