J.D. Martinez drove in the tiebreaking run when he was hit by a pitch with the bases loaded in the 10th inning and the Boston Red Sox beat the Toronto Blue Jays 6-5 on Wednesday night, avoiding a three-game sweep.

"It’s a big one," Martinez said. "We lost that one last night. To avoid the sweep at this point was a big one."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Rafael Devers being held back by un umpire

Boston Red Sox third baseman Rafael Devers (11) is held back by an umpire during a heated exchange after Toronto Blue Jays' Alejandro Kirk was hit by a pitch during the fourth inning of a baseball game Wednesday, June 29, 2022, in Toronto.  (Christopher Katsarov/The Canadian Press via AP)

Alex Verdugo hit a two-run homer and had four RBIs, and Franchy Cordero had his first career four-hit game as Boston bounced back from Tuesday's 6-5 defeat to win for the third time in 10 meetings with Toronto this season.

"It’s been hard to win here," Red Sox manager Alex Cora said.

The Red Sox, who are off Thursday, went 20-6 in June, their most wins in the month since going 20-9 in 1990.

"We played some solid baseball," Cora said. "We gained some ground. We put ourselves in the playoff hunt."

With automatic runner Jackie Bradley Jr. at second base to start the 10th, Blue Jays right-hander David Phelps (0-2) walked Rob Refsnyder and Rafael Devers to load the bases for Martinez, who was hitless in his previous 13 at-bats.

FREDDIE FREEMAN FIRES AGENTS AFTER BEING FRUSTRATED WITH FREE AGENCY NEGOTIATIONS: REPORT

Bradley scored when Phelps hit Martinez in the back with a 1-2 pitch.

Martinez had a circular red welt on his back in the clubhouse afterward, but didn’t seem to mind.

"It was worth it," he said.

Tim Mayza came on and got Xander Bogaerts to ground into a double play but Verdugo followed with a two-run double to make it 6-3.

Matt Strahm (3-2) struck out Bo Bichette and Guerrero in the ninth, but gave up an RBI single to Santiago Espinal and an RBI double to Cavan Biggio in the 10th. Strahm ended it by getting George Springer to fly out.

Both benches and both bullpens cleared after Red Sox right-hander Nick Pivetta hit Blue Jays catcher Alejandro Kirk on the left elbow in the third. After Toronto manager Charlie Montoyo left the dugout, Blue Jays slugger Vladimir Guerrero Jr. hopped the dugout fence and started yelling at Pivetta, who yelled back. Devers stepped in front of Guerrero as other players rushed to join the melee, but no punches were thrown.

"I don’t hit a lot of guys," Pivetta said. "I think it’s unwarranted the way they reacted. It’s not what I’m trying to do in that situation."

BREWERS' JONATHAN DAVIS MAKES SPECTACULAR CATCH IN 2ND INNING VS RAYS

Montoyo didn’t seem convinced that the hot-hitting Kirk wasn’t drilled on purpose.

"I don’t know what the intents were," Montoyo said. "I just know what I know but I keep it to myself."

Springer hit his 15th home run, a solo shot in the fifth.

Toronto opened the scoring on Espinal’s two-out RBI single in the second, but Boston answered in the third on Refsnyder’s sacrifice fly, a drive to deep center that Springer ran down.

Springer put the Blue Jays in front with his leadoff blast in the fifth but the Red Sox reclaimed the lead in the sixth. Bogaerts reached on a two-out infield single and Verdugo followed with a drive to right, his sixth.

The Blue Jays tied it against Ryan Brasier in the eighth, rallying against Boston’s bullpen for the second straight night. Lourdes Gurriel Jr. hit a one-out double and was replaced by pinch-runner Bradley Zimmer, who scored when Raimel Tapia followed with a double to center. The blown save was Boston’s 16th in 33 chances.

Pivetta allowed two runs and five hits in six-plus innings. He walked three and struck out five.

Blue Jays right-hander Alek Manoah allowed three runs, two earned, and six hits in seven innings. He walked one and struck out six.

ASTROS' YORDAN ÁLVAREZ, JEREMY PEÑA INVOLVED IN SCARY COLLISION DURING GAME VS METS

Alek Manoah being held back by Teoscar Hernandez

Toronto Blue Jays pitcher Alek Manoah, left, is held back by outfielder Teoscar Hernandez during a heated exchange with the Boston Red Sox after Blue Jays' Alejandro Kirk was hit by a pitch during the fourth inning of a baseball game Wednesday, June 29, 2022, in Toronto.  (Christopher Katsarov/The Canadian Press via AP)

TRAINER’S ROOM

Red Sox: RHP Garrett Whitlock (right hip) threw a bullpen session before the game, his second in three days. Cora said Whitlock could return in a relief role when he is activated.

SEE YOU IN SEPTEMBER?

One day after his team blew a ninth-inning lead and lost 6-5, Cora said he was willing to bet his roster would be more complete when Boston comes back north of the border for a three-game series beginning Sept. 30. Boston closer Tanner Houck, who has six saves, has missed two trips to Toronto this season because he isn’t vaccinated against COVID-19. The vaccination status of injured LHP Chris Sale is unclear.

ROSTER MOVES

Toronto completed the signing of RHP Sergio Romo to a one-year deal. RHP Shaun Anderson was optioned to Triple-A Buffalo to make room on the major league roster, while LHP Tayler Saucedo (right hip) was transferred to the 60-day IL to open a spot on the 40-man roster. Romo was cut by Seattle June 20.

LIMITED MARKET

Romo offered a wry assessment of his appeal to other big league teams after being cut by the Mariners.

"I’m 39 and throw 85," Romo said.

Nick Pivetta held back by Christian Vazquez

Boston Red Sox catcher Christian Vazquez holds back starting pitcher Nick Pivetta (37) during a heated exchange with the Toronto Blue Jays after Blue Jays' Alejandro Kirk was hit by a pitch during the fourth inning of a baseball game Wednesday, June 29, 2022, in Toronto.  (Christopher Katsarov/The Canadian Press via AP)

CLICK HERE TO GET THE FOX NEWS APP

UP NEXT

Red Sox: LHP Rich Hill (4-4, 4.09) starts Friday as the Red Sox visit Chicago for a three-game series against the Cubs. The Cubs have not named a starter for Friday.

Blue Jays: LHP Yusei Kikuchi (2-4, 5.08) starts Thursday as the Blue Jays open a unique five-game series against the Tampa Bay Rays, including a doubleheader Saturday. The Rays have not named a starter for Thursday.