TORONTO — Boston slugger David Ortiz went out with a bang in his final regular-season game in Toronto.

Ortiz drilled a three-run homer in the sixth inning, Jackie Bradley Jr. and Hanley Ramirez also connected, and the Red Sox outslugged Toronto 11-8 Sunday, reclaiming a two-game lead over the Blue Jays in the AL East.

“Wins are wins no matter what but some wins are different,” Ortiz said. “Some wins can get you some momentum.”

Ortiz put Boston up 10-8 with a drive off Joaquin Benoit. It was his 41st career home run at Rogers Centre, his highest total at any road stadium.

“Toronto is a very nice place to play baseball and a beautiful city,” Ortiz said. “It’s always a pleasure to come here.”

With his 535th career homer, Ortiz moved past Jimmie Foxx into sole possession of 18th place on baseball’s career list. He also increased his RBI total to 110, the most by a player age 40 or above since Dave Winfield had 108 for Toronto in 1992.

“We’re somewhat in awe of what David is doing in his final run,” Red Sox manager John Farrell said.

Starter Clay Buchholz said Ortiz is “having a hell of a going away party.”

Edwin Encarnacion homered twice and Troy Tulowitzki hit his third career grand slam, but the Blue Jays couldn’t force a tie in the standings. Toronto and Baltimore are tied for the lead in the wild-card race.

“It just didn’t go our way today,” Tulowitzki said. “There’s a lot of time left.”

Toronto finishes the regular season with three games at Fenway Park.

“Obviously we can’t sit back and relax,” Boston second baseman Dustin Pedroia said. “We know our division is good and we’ve got to continue to play well.”

Pedroia and Xander Bogaerts singled against Bo Schultz (0-1) before Benoit came on to face Ortiz, who swung and missed the first pitch but connected on the second.

Ortiz hit a tying grand slam off Benoit, then with Detroit, in Game 2 of the 2013 ALCS at Fenway Park. Boston went on to win 6-5.

“This might not have been the same stage but where we are, against (Toronto), really no less important,” Farrell said.

Robbie Ross Jr. (3-2) got two outs for the win. Craig Kimbrel, the ninth Boston pitcher, worked the ninth for his 25th save.

Toronto also used nine pitchers.

Blue Jays manager John Gibbons was ejected in the ninth after the umpires ruled Russell Martin’s double into the right field corner, initially ruled fair, had landed foul. Toronto challenged, but the call was confirmed. Martin later struck out.

Encarnacion hit a solo home run off Buchholz in the first, singled and scored in the third, and then hit a two-run shot off Heath Hembree in the fourth. It was his fourth multihomer game of the season and No. 25 for his career. Encarnacion has 39 home runs and leads the AL with 115 RBIs.

After Martin walked on four pitches with the bases loaded in the fourth, Tulowitzki hammered Buchholz’s first pitch for his 23rd home run.

Boston tied it at 6 and chased Aaron Sanchez on a two-out, two-run single by Bogaerts in the fourth, but Toronto answered with Encarnacion’s second homer in the bottom half.

After Ramirez cut it to 8-7 with a drive to deep center in the fifth, Boston’s Brock Holt tried to steal home but was thrown out by reliever Aaron Loup.

“It definitely would have been a lot cooler if I had got in there safe,” Holt said.

THE STREAK CONTINUES

Pedroia has hit safely in 29 straight games against Toronto, the longest active streak by any player against a single opponent.

TRAINER’S ROOM

Red Sox: Holt was tagged on his sore right shoulder as he dove back to first base on a pickoff attempt in the fifth. He was checked by a trainer and stayed in.

UP NEXT

Red Sox: LHP David Price (15-8, 3.87 ERA) seeks his seventh straight win as Boston returns home for a three-game series against Baltimore. LHP Wade Miley (8-12, 5.49 ERA) starts for the Orioles.

Blue Jays: LHP Francisco Liriano (7-12, 5.27 ERA) starts the opener of a three-game series against Tampa Bay on Monday. Liriano last started Aug. 26 against Minnesota and has made two relief appearances since. RHP Jake Odorizzi (9-6, 3.86 ERA) starts for the Rays.