ARLINGTON, Texas — Eduardo Rodriguez labored through five innings to get his 19th win, allowing more runs than he had in his previous seven starts combined, and the Boston Red Sox beat the Texas Rangers 12-10 on Tuesday.

Rodriguez (19-6) exited with a 12-7 lead after throwing 113 pitches. He struck out six while giving up a season-high 11 hits and walking three on a night when the Red Sox scored in all five innings he was in the game.

The 26-year-old left-hander will get a shot at 20 wins in Boston's season finale at home Sunday against Baltimore, which is 0-3 against him this year. Rodriguez had allowed only five runs over 45 innings (1.00 ERA) in seven games since mid-August.

With last year's World Series champions out of playoff contention, their focus the final week has turned to Rodriguez trying to win 20 games and Rafael Devers' pursuit of 200 hits - he has 194 with five games remaining after two hits in the series opener.

Boston (82-75) clinched a winning record while the Rangers (75-82), who opened their final homestand before moving into a new stadium next year, will have their third straight losing season. But in manager Chris Woodward's first season, Texas already has eight more wins than last year.

Brandon Workman, the fourth Boston reliever, worked the ninth for his 16th save in 22 chances. The first appearance at Texas for the Arlington-born reliever came in his 187th game and fifth big league season.

Rodriguez had a 4-0 lead before throwing his first pitch, but had thrown 38 pitches and the Rangers too had batted around to tie the game at 4 after a 49-minute first inning. The game lasted 3 hours, 59 minutes.

The Red Sox went back ahead when Mookie Betts led off the second with his 29th homer. But Delino DeShields opened the Texas second with a triple to right, on a play when Betts ran into the wall, and scored on a sacrifice fly by Elvis Andrus. Betts didn't go back to the field in the third because of left foot pain.

An unearned run in the third put Boston ahead to stay at 6-5. Mitch Moreland had a leadoff double off Ariel Jurado (7-11) and scored on a two-out error by second baseman Rougned Odor.

J.D. Martinez, who had an RBI single in the first, hit a two-run single in the fifth - giving him 103 RBIs for the season- to make it 12-5.

Odor's 28th homer was a two run-shot in the Rangers fifth, and they had two more runners on base when manager Alex Cora went out to visit the mound. Two pitches later, the inning ended when catcher Christian Vázquez threw out DeShields trying to steal second.

TRAINER'S ROOM

Rangers: OF Hunter Pence (lower back strain) said he was "very frustrated' after a setback in rehab over the weekend that definitely ended his season. "Unfortunately, this is not something I can just willpower through and overcome," said the 36-year-old Pence, who last played Aug. 22. "The goal now is to get healthy to potentially play next year. And if not that, to have a healthy life and a quality of life." In his first season with his hometown team, Pence hit 18 homers and 59 RBIs in 83 games and was an All-Star for the fourth time.

UP NEXT

Right-hander Rick Porcello (13-12, 5.56 ERA), the last Red Sox pitcher to win 20 games when he was 22-4 as the AL Cy Young Award winner three years ago, makes what could be his final start in Boston. He is eligible for free agency this offseason after five years with the Red Sox. Rookie lefty Kolby Allard (4-1, 4.25 ERA) pitches for Texas.