Boston Red Sox’s J.D. Martinez is doused with sports drink after a baseball game against the Seattle Mariners at Fenway Park on Friday, June 22, 2018, in Boston. Martinez singled in the go-ahead run in the Sox’s 14-10 victory. (AP Photo/Elise Amendola)

BOSTON — J.D. Martinez homered and drove in five, and the Boston Red Sox rallied from a five-run deficit to beat the Seattle Mariners 14-10 on Friday night despite a monster game from Nelson Cruz.

Cruz had a pair of three-run homers and drove in seven, but the Mariners still lost their season-worst fifth straight game, including three earlier this week at Yankee Stadium. Seattle led 4-0 and 10-5 before a wild Red Sox rally fueled by RBIs from eight different players.

Martinez went 4 for 5, including a two-run homer in the sixth and two doubles. The Red Sox set a season high with 20 hits.

Reliever Matt Barnes (1-2) got the win with one scoreless inning, and Craig Kimbrel pitched the ninth.

Juan Nicasio (1-4) took the loss, allowing five runs on four hits in one-third of a lousy seventh inning.

The only flaw to the second half of the game for Boston: shortstop Xander Bogaerts left in the seventh with a sprained index finger on his left hand.

Ryon Healy hit a solo homer during Seattle’s four-run first inning as the Mariners got to knuckleballer Steven Wright. Seattle added two more off Wright in the second after Boston’s five-run bottom of the first.

Seattle scored four in the fourth, including Cruz’s second three-run shot of the game, but Boston’s bullpen shut down Seattle the rest of the way while the Mariners’ imploded.

Rafael Devers singled in a run in the fifth, and then Martinez homered off Nick Vincent to center in the sixth to pull Boston within 10-8. Mitch Moreland followed with a triple just beyond the reach of diving right fielder Mitch Haniger, and Bogaerts drove in Moreland with an infield single

Barnes struck out the side in the seventh, and then Boston got to Nicasio. Devers singled to lead off, Blake Swihart singled with one out and Nicasio walked Mookie Betts to load the bases. Andrew Benintendi blooped a single into shallow center to bring in Devers and tie it at 10.

Swihart was nearly picked off third as Benintendi scored, but he slid under the tag after a strong throw by center fielder Guillermo Heredia. Seattle did not challenge the close play, and Martinez followed with a two-run single.

Nick Rumbelow later allowed Benintendi to score on a wild pitch, and Eduardo Nunez added a pinch-hit RBI single.

TRAINER’S ROOM

Mariners: Activated RHP Vincent (strained right groin) from the 10-day DL and optioned RHP Ryan Cook to Triple-A Tacoma.

Red Sox: Benintendi needed a minute to collect himself after running hard into the Green Monster on a double by Denard Span.

UP NEXT

Mariners: RHP Mike Leake (7-4, 4.47 ERA) gets his second straight start against the Red Sox after taking the loss Sunday in Seattle, allowing five runs on eighth hits in six innings.

Red Sox: LHP Eduardo Rodriguez (9-1, 3.59) has won a career-high six straight starts, including Boston’s 9-3 victory over the Mariners in Seattle on Sunday.