ARLINGTON, Texas (AP)Ryan Jeffers hit a tiebreaking home run in the sixth inning, and the Minnesota Twins beat the Texas Rangers 6-5 on Sunday to avoid a three-game sweep.

Jeffers, batting ninth in the order, hit a run-scoring single in the second and put the Twins ahead 5-4 with a drive off Brock Burke (4-2). Jeffers was 5 for 8 in the series with four RBIs and two of his seven homers this season.

”When his offense is there, that’s great,” Twins manager Rocco Baldelli said. ”When the offense isn’t there, he does a good job behind the plate. He’s a big contributor.”

Minnesota got another run in the seventh when with runners at the corners, Matt Bush threw wildly past first for an error while trying to pick off Gilberto Celestino.

Byron Buxton hit his 23rd homer for the Twins, who opened a 4 1/2-game lead over second-place Cleveland in the AL Central and avoided what would have been their first four-game losing streak this season.

Corey Seager homered for the third straight game, an oppposite-field, eighth-inning drive to left off Jhoan Duran that glance off the glove of Celestino, who tried for a leaping catch. The home run, on a 100 mph pitch, was Seager’s 19th this season.

Dylan Bundy (5-4) allowed four runs and six hits in five innings, improving to 7-2 against Texas and 3-0 at Globe Life Field. Bundy, whose overall record is 51-61, had been 0-1 in three starts since winning at Arizona on June 18.

He allowed a three-run double by rookie Josh Smith in the second.

”I was mad at myself for the two walks and the one Smith hit that split the gap,” Bundy said.

Tyler Duffey worked around Jonah Heim’s two-out single for his second save in five chances.

”I told him we needed a zero,” Baldelli said. ”Not `pitch pretty good.’ We need a zero.”

Texas starter Dane Dunning gave up four runs, six hits and four walks in a season-low 2 1/3 innings. He threw just 38 of 66 pitches for strikes.

Buxton homered in the first, and run-scoring singles by Jose Miranda and Jeffers built a 3-0 lead in the second.

Dunning walked three straight batters in the third, then hit Miranda with a pitch. Seager’s fifth-inning sacrifice fly tied the score 4-4.

SEEING STARS

Representing the Twins at the All-Star Game will be Buxton and first Luis Arraez, who leads the major leagues with a .348 average. The Rangers’ only All-Star is left-hander Martin Perez, 7-2 with a 2.72 ERA.

TRAINER’S ROOM

Twins: OF Nick Gordon left with a bruised left leg after fouling a pitch off the leg in the seventh inning. ”It was more calf than anything else. We have the off day so we’ll see how he is on Tuesday.

Rangers: C-DH Mitch Garver will have season-ending surgery on Monday to repair a torn flexor tendon in his throwing arm.

UP NEXT

Twins: RHP Josh Winder (4-2, 3.12) starts Tuesday against visiting Milwaukee, which sends RHP Jason Alexander (2-1, 4.75) to the mound in the opener of a two-game series.

Rangers: RHP Spencer Howard (0-1, 10.97) starts Monday’s opener of a three-game series against Oakland. RHP Adrian Martinez (2-1, 6.00) starts for the A’s.

More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports