TORONTO — Russell Martin came through to help the Toronto Blue Jays get a big win after they gave up a late lead.

The veteran catcher hit a tiebreaking home run in the bottom of the eighth inning to lift the Blue Jays to a 7-6 victory over the Tampa Bay Rays on Wednesday night.

It came right after the Rays scored three in the top of the inning to tie the score.

“I felt like our team at that moment needed that,” Martin said. “So a nice bounce-back win, a collective win, I feel like we kind of battled that one out.”

Kendrys Morales homered among his two hits and drove in four runs for the Blue Jays.

Trailing 6-3, the Rays tied it on Logan Morrison’s 19th homer, a two-run shot off reliever Joe Smith (3-0) and Derek Norris’ sacrifice fly. Martin then connected for his sixth home run of the season off reliever Jose Alvarado (0-1) over the center-right-field fence in the bottom half.

It was the first homer Alvarado has given up all season, and Rays manager Kevin Cash wasn’t second-guessing his decision to put the reliever in the game after tying the score.

“I think the guy’s earned the opportunity to come in there and pitch,” Cash said. “You could tell Martin’s approach from the first pitch what he was trying to do and he made an adjustment, got a pitch he could hit and knocked it out of the park.”

Roberto Osuna ensured it stood up in the ninth, finally forcing Evan Longoria to pop out to second base to earn his 17th save of the season — and 16th in a row, the longest active streak in the majors.

The Blue Jays recovered for the win after Nelson Liriano lasted a season-high seven innings against a Tampa Bay team that chased him after just 1/3 of an inning in his season-opener, the shortest start of his career. Though the no-decision left him at 99 career wins, Liriano held Tampa to five hits and two earned runs, striking out nine.

“Shoot, he was dynamite,” manager John Gibbons said after seeing his team split the two-game series with the Rays.

After surrendering two runs in the third, Liriano was on the verge of getting pulled after loading the bases with none out on two walks and a bunt in the fourth inning. However, he escaped the jam, giving up just one run, before retiring the next seven batters.

“It was big,” Liriano said through a translator of getting out of that inning. “I just tried to execute pitches, let the guys behind me do the work and it worked out pretty well.”

With the Blue Jays trailing 3-2 in the fifth, Morales hit a three-run shot into the second deck in right field for his 13th home run of the season and fourth RBI of the game. Morales also had a run-scoring grounder in the third for Toronto’s first run.

Nine of Morales’ home runs have either tied the game or given Toronto a lead this season.

Tampa starter Jake Oderizzi was knocked out of the game in the fifth inning, after surrendering the three-run shot to Morales. It marked the ninth consecutive appearance that Odorizzi had allowed a homer, a career high and the second-longest active streak in the majors behind 11 by Jesse Chavez of the Los Angeles Angels.

“There’s definitely way better in me than what I’m doing right now and I will be better and I’ll be better hopefully soon,” he said.

GAME OF FIRSTS

After being called up from Triple-A Buffalo to replace the injured Ezequiel Carrera, OF Dwight Smith Jr. made the most of his opportunity, registering his first hit at Rogers Centre, his first career three-hit game and his first major-league steal.

GOING DEEP

Morales’ home run was measured at 465 feet, the longest home run by any Blue Jays player this season.

DRAFT PICK

With their 11th-round pick, the Rays took University of Kentucky RHP Justin Lewis, who is the cousin of both Seattle Seahawks Pro Bowler Richard Sherman and former NBA forward Chuck Hayes.

TRAINER’S ROOM

Rays: SS/2B Tim Beckham’s knee responded well to treatment, according to Cash, and is expected to play this weekend in Detroit.

Blue Jays: OF Carrera was placed on the 10-day DL on Wednesday with a fractured right foot. The left fielder suffered fouled a ball off his foot in Tuesday night’s loss to the Rays and while X-rays were negative, a CT scan Wednesday showed the fracture. … Gibbons said OF Steve Pearce, out since May 15 with a calf strain, should rejoin the team by the weekend.

UP NEXT

Rays: The Rays visit Detroit for a four-game series beginning Thursday, when RHP Alex Cobb (5-5, 4.29) will take on RHP Justin Verlander (4-4, 4.68).

Blue Jays: After a day off, Toronto will open a three-game series against the White Sox on Friday with a matchup between RHP Joe Biagini (1-5, 3.38) and Chicago LHP Jose Quintana (2-8, 5.30).