Boston’s Rob Refsnyder hits a two-run single to give the Red Sox the lead against the Rangers on Monday night in Arlington, Texas. Tony Gutierrez/Associated Press

ARLINGTON, Texas — Rob Refsnyder hit a go-ahead two-run single in the eighth inning and the Boston Red Sox snapped a four-game losing streak with a 4-2 win over the playoff-chasing Texas Rangers, who lost their fourth in a row even after getting two All-Star players back in their lineup Monday night.

Boston rallied against reliever Will Smith (2-7), who walked No. 8 batter Luis Urias and then gave up a double that snapped No. 9 batter Connor Wong’s 0-for-17 slide. Refsnyder’s one-out hit that made it 3-2 came after Rafael Devers, with 10 hits his previous 21 at-bats, was intentionally walked. Adam Duvall followed with a sac fly.

Marcus Semien, the only Rangers player to start all 150 of their games, hit another leadoff homer and had an RBI single.

Texas (82-68), already guaranteed its first winning record since 2016, began the day one game ahead of Seattle for the American League’s third and final wild-card spot. The Mariners, who the Rangers play seven times in the season’s last 10 days, were at Oakland on Monday night.

While not yet eliminated from the playoffs, the Red Sox (75-76) were at the bottom of the AL East standings and 7 1/2 games behind the final wild-card spot with only 11 games to play. Urias had an RBI single in the fifth for their other run.

Josh Winckowski (4-2) struck out three and walked two in a scoreless seventh for Boston after starter Kutter Crawford had seven strikeouts without a walk and allowed two runs over six innings. Chris Martin struck out two in the ninth, his 19th consecutive scoreless appearance and only second save.

Rangers rookie third baseman Josh Jung and slugging right fielder Adolis Garcia were both activated from the injured list. Jung, who was 1 for 4 with a single in the ninth inning, had been out six weeks with a fractured left thumb. Garcia went 0 for 3 with a walk and two strikeouts after missing 10 games with a patellar tendon strain in his right knee.

It was the first time since July 21, the night shortstop Corey Seager exited with a sprained right thumb and missed nine games, that the Rangers had in their lineup all five of their position players who started for the American League in the All-Star Game on July 11. Switch-hitting catcher Jonah Heim also had an IL stint since then.

NOTES: Semien’s 25th homer of the season came on the first pitch thrown by Crawford. It was the AL-best ninth leadoff homer in a first inning for Semien, extending his single-season franchise record. It was the third time this month he hit a leadoff homer on the first pitch. … Trade deadline acquisition Jordan Montgomery struck out eight without any walks while allowing one run over seven innings in his ninth start for the Rangers. … Red Sox rookie OF Wilyer Abreu was out of the lineup a day after he hurt his throwing hand when crashing into the wall trying to make a catch on the game-ending play in their loss at Toronto. He is expected back in the lineup Tuesday.

Comments are no longer available on this story