Rafael Devers, center, is surrounded by teammates while celebrating his winning RBI-single in the bottom of the ninth inning of Monday’s game against Toronto at Fenway Park. Boston won, 2-1. Charles Krupa/Associated Press

BOSTON — The Toronto Blue Jays hit 15 homers in a four-game series at Fenway Park, with 11 of them sailing over the Green Monster.

The Boston Red Sox only needed to bang two off it to earn a split.

Rafael Devers hit a line drive off the left-field wall in the bottom of the ninth inning on Monday night after Vladimir Guerrero Jr. cleared it for a tying drive in the top half, and the Red Sox bounced back from their worst loss of the season to beat Toronto 2-1.

It was Boston’s second walkoff win of the series, with Alex Verdugo delivering a winning single in a similar spot on Friday night. In between, the Blue Jays won 7-2 and 18-4, hitting 13 homers in the two wins – a record eight on Sunday alone.

“Yesterday was just a game,” Red Sox Manager Alex Cora said. “Like I said: 18-4, 1-0, 2-1, if you lose you lose, if you win it, you win it. We just earned a split against them. They didn’t gain ground on us. We didn’t lose ground on them. And now we go to Atlanta.”

Matt Barnes was two strikes away from finishing off a combined three-hit shutout when Guerrero homered 451 feet onto Lansdowne Street to tie the game at 1. It was his major league-leading 22nd home run of the season, and his fourth in as many games.

But Verdugo, who also drove in Boston’s first run, and J.D. Martinez singled off Rafael Dolis (1-3) to lead off the bottom of the ninth. One out later, Devers banged one off the wall in left-center; he stopped before reaching second to receive the congratulations of his teammates pouring out of the dugout, and was credited with a single.

One day after Toronto’s eight home runs set a record for a visiting team at 109-year-old Fenway Park, Nathan Eovaldi took a one-hitter into the seventh. He held them to three hits and a walk in all, while striking out four in 6 2/3 innings.

“As bad as the last two games have been, to split this series 2-2 is big for us,” Eovaldi said, adding that he was eager to end to a string of bad starts from the Red Sox rotation.

“Whenever we get on a good streak, it starts with pitching. It takes one starter to go out there and do a good job, and it resets everybody.”

Josh Taylor retired four straight batters, striking out three of them, and Barnes (3-1) got two quick outs before Guerrero tied it.

“Vladdy’s nasty right now,” Devers said.

Verdugo, Devers and Marwin Gonzalez each had two of Boston’s seven hits.

Gonzalez singled to lead off the third inning, Kike Hernandez replaced him on a fielder’s choice and then scored when Verdugo’s double hit the top of the Green Monster scoreboard, buying just enough time for him to race around from first.

Toronto rookie Alek Manoah went six innings, allowing one run on four hits and a walk, striking out five.

Guerrero and Teoscar Hernandez singled to lead off the seventh, but Randal Grichuk grounded into a 5-4-3 double play, and then Taylor came on to strike out Rowdy Tellez to strand the runner at third.

The Red Sox had lost four of the previous six games, with their starters allowing 31 runs in 25 innings. In Sunday’s loss to Toronto, Boston allowed season highs of 18 runs, 20 hits and 11 extra-base hits.

NOTES:  Boston acquired pitcher Yacksel Rios from the Seattle Mariners for cash … Boston designated RHP Ryan Weber for assignment to make room on the 40-man roster … INF Michael Chavis was recalled from Triple-Worcester for Monday’s game.

Comments are not available on this story.