The Red Sox’s winning streak has ended at six.

Boston battled for 17 innings against the Twins, but Minnesota took the marathon victory, earning a 4-3 win Tuesday night at Target Field. Rafael Devers and Mookie Betts clubbed solo shots in the seventh and 13th innings, respectively, to put the Red Sox in front, but Boston could not preserve the lead either time.

Max Kepler, who homered to tie things in the 13th, clubbed the walk-off hit to wrap it up.

David Price pitched well, giving up just one earned run on four hits. He had four strikeouts, but exited after just five innings, leaving things to the bullpen.

With the loss, the Red Sox slip to 40-35, while the Twins climb to 48-24.

Here’s how it all went down:

GAME IN A WORD
Long.

Do we need to explain?

ON THE BUMP
— Price cruised through the first three innings, giving up just one hit before running into some trouble in the fourth.

After getting the first two outs with ease, the left-hander gave up a double to Eddie Rosario before C.J. Cron tied the game at one with an RBI single.

Price’s night ended after a scoreless fifth inning.

— Mike Shawaryn got the ball for the sixth and gave up a leadoff double to Mitch Garver, then allowed a single to put runners on the corners with nobody out.

The first out came from a heads-up play by Christian Vazquez to throw Garver out at third.

Shawaryn loaded the bases on back-to-back walks, but got out of the jam by getting Miguel Sano to strike out swinging.

— Ryan Brasier pitched a scoreless, hitless seventh with two strikeouts, but it might have gone different had it not been for Jackie Bradley Jr.’s spectacular catch to end the inning and rob Jorge Polanco of extra bags.

— Brandon Workman was on the mound in the eighth, and Garver worked a leadoff walk. Workman did get the next two outs, but Garver put himself into scoring position on a wild pitch before Cron drew a free pass.

It paid off for the Twins when Kepler drove in Garver with a single to make it 2-2.

Workman got out of the inning without further damage.

— Matt Barnes began the ninth by hitting Jake Cave. He caught Jonathan Schoop looking at strike three for the first out before Polanco struck out swinging. Barnes got out of the jam thanks to a Garver pop out, sending the game into extras.

— Josh Taylor pitched a scoreless 10th with three strikeouts.

He came back out for the 11th and pitched a 1-2-3 frame, striking out two.

— Colten Brewer surrendered a two-out walk to Nelson Cruz in the 12th before Rosario singled to shallow right, but got out of the inning unscathed.

— Boston took a one-run lead in the top of the 13th, but Hector Velazquez gave up a solo shot to Kepler to tie the game again in the bottom half.

 

Velazquez came back out for the 14th and tossed a 1-2-3 inning. After giving up a leadoff double in the 15th, Velazquez got Cron to line out to first, and Rosario was doubled up at second as the Sox tight-roped out of the inning.

Velazquez was lifted before the 17th after a pair of meetings with team trainers.

— Brian Johnson entered and allowed Luis Arraez and Rosario to reach, then intentionally walked Cron to face Kepler, who walked it off.

IN THE BATTER’S BOX
— Boston struck first in the fourth when Michael Pineda surrendered a leadoff walk to Betts. He struck out the next two batters, but Devers smacked an RBI-single to right field to make it 1-0.

— The Red Sox broke the 1-1 tie courtesy of Devers’ 12th home run of the year in the seventh, giving Boston the 2-1 edge.

— The Red Sox tried to do some damage in the 10th when Brock Holt led the inning off with a double. He took third on a Michael Chavis groundout before Bradley was drilled with a pitch to put runners on the corners with one out. However, the Red Sox couldn’t find a run

— Boston again threatened in the 12th with two on and two out, but couldn’t capitalize, as Christian Vazquez and Betts both flied out to end the threat.

— Boston finally took the lead back in the 13th on a Betts solo home run that hit off the left-field pole.

— The Red Sox, as they did all through extras, threatened to take the lead after Holt and Chavis hit back-to-back singles and Bradley moved them up with a sacrifice bunt in the 14th. Betts was intentionally walked to load the bases with two outs, but grounded out to second to end the inning.

— Andrew Benintendi led off the 17th with a single, then stole second and took third on an errant throw from Garver. But he was stranded there after a strikeout and ground out from Devers and Bogaerts, respectively.

— Devers, Benintendi and Holt led the Red Sox with three hits, while Bradley, Bogaerts and Vazquez had two apiece.

— J.D. Martinez went 0-for-8 with five strikeouts.

TWEET OF THE GAME
It was a long night.

UP NEXT
The Red Sox wrap up their series against the Twins on Wednesday night. First pitch from Target Field is set for 8:10 p.m. ET.

Thumbnail photo via Jesse Johnson/USA TODAY Sports Images