Boston Red Sox’s J.D. Martinez, right, elebrates his home run during the fourth inning of the second game of a doubleheader Saturday, Aug. 11, 2018, in Baltimore. Also seen are Baltimore Orioles catcher Caleb Joseph, center, and home plate umpire Hunter Wendelstedt. (AP Photo/Nick Wass)

BALTIMORE — After letting his teammates do the heavy lifting in the first game of a doubleheader, J.D. Martinez carried the Boston Red Sox to victory in the nightcap.

Martinez hit two home runs, including a tiebreaking, two-run drive in the eighth inning, and the Red Sox beat the Baltimore Orioles 6-4 Saturday night for a sweep of the split admission twinbill.

In the opener, David Price struck out 10 over six sparkling innings, Jackie Bradley Jr. hit a pair of solo homers and Boston cruised to a 5-0 daytime victory.

Martinez leads the majors with 37 homers, 104 RBIs and 143 hits, but he did nothing to add to those numbers in the first game, going 0 for 4.

“The first game for me was rough, so I was in battle mode out there,” Martinez said.

Martinez hit a solo shot in the fourth inning before connecting in the eighth off Mike Wright (3-1) to make it 5-3. It was his third multihomer game of the season, all against Baltimore.

“I really work hard at preparation,” he said. “I look at the game as an exam, like a test.”

Give the man an A. He went 2 for 2 with two walks and three RBIs to keep Boston on a roll.

The Red Sox have won nine of 10 to improve their big league-best record to 84-35. The split doubleheader was caused by a rainout on July 25; before the bad weather came that night, Boston led 5-0 in the second inning.

Boston manager Alex Cora used a collection of relievers to handle the pitching in the second game, beginning with Hector Velazquez, including Joe Kelly (4-0) and concluding with Craig Kimbrel, who worked the ninth for his 34th save.

It was a struggle until Martinez sent a 1-0 pitch into the left-field seats.

“In the eighth, we were worried about how we were going to put together these 27, 30 outs, whatever we needed to win,” Cora said. “Then he put a great at-bat together.”

Joey Rickard and Trey Mancini homered for the Orioles, who will try to avoid a four-game sweep on Sunday. Baltimore is 2-13 against the Red Sox this season.

The Orioles stranded 10 and went 2 for 9 with runners in scoring position.

“We had some opportunities with some people on base that we didn’t cash in on,” manager Buck Showalter said.

The Orioles (35-83) were officially eliminated from contention in the AL East on Friday night and on Saturday clinched a second straight losing season.

In the first game, Price (12-6) scattered five hits and walked none to win his sixth straight start against Baltimore. The lefty had at least one strikeout in every inning and did not allow a runner past second base.

Three relievers followed Price with three hitless innings. With a dozen shutouts, the Red Sox are tied with the Cubs, Indians and Pirates for the major league lead.

After the Red Sox won 19-12 on Friday night, both teams were quiet offensively until Boston broke through with a flourish against rookie Jimmy Yacabonis (0-1) in the fifth inning.

Xander Bogaerts led off with a single and Eduardo Nunez hit a 3-0 pitch inside the left-field foul pole for a home run. One out later, Bradley lined an opposite-field drive to right.

That was all the offense the Red Sox required with Price in peak form.

TRAINER’S ROOM

Red Sox: C Blake Swihart (hamstring strain) will begin his rehabilitative assignment on Sunday with Short-A Lowell, Cora said.

Orioles: OF Craig Gentry (ribs) went 1 for 3 and scored a run Saturday night in a rehab assignment with Class A Frederick.

ORIOLE FAME

Former second baseman Brian Roberts and longtime play-by-play announcer Fred Manfra were inducted into the Orioles Hall of Fame in a ceremony before the second game.

UP NEXT

Red Sox: Chris Sale (11-4, 2.04 ERA) starts Sunday after a two-week stint on the disabled list with shoulder inflammation. Cora said the Boston ace could throw 100 pitches if he’s not too rusty. To make room for Sale, after the second game the Red Sox designated reliever Brandon Workman for assignment.

Orioles: Alex Cobb (3-14, 5.55 ERA) makes his 22nd start of the season. Baltimore is 4-17 in his starts, and he’s won only once since June 5.