By Michael Hurley, CBS Boston

BOSTON (CBS) — The Red Sox entered this week’s series in Florida against the Blue Jays with a 1.5-game lead in the AL East. It shrunk to just a half-game after Toronto took the opener on Tuesday night.

And it could’ve gotten back to that precarious spot if the Red Sox couldn’t pull out a win in the rubber match of the series on Thursday. And multiple times, it looked like it would.

Alas, these Red Sox have a certain flair for the dramatic.

With two outs in the ninth inning and the tying run on third base, J.D. Martinez launched an absolute missile to right-center field off Rafael Dolis. That two-run shot gave the Red Sox an 8-7 lead.

“It was just a big at-bat, big situation against that team, a team we’re going to be battling with all year,” Martinez said of his emotional reaction while rounding first base. “So to kind of steal one like that is big for us. They’re on our heels in the standings. I know it’s early, but any time we play them, these are the games you kind of gain those gaps on. So it was a big one.”

That dramatic homer — which was the 250th of Martinez’s career — came after Bobby Dalbec and Michael Chavis began the inning with base hits. Kiké Hernandez got caught looking at strike three on a full count, and after a wild pitch advanced the runners, Alex Verdugo grounded out to first base, bringing home the run that made it a one-run deficit while getting the tying run to third.

“Obviously when he gets up, he can drive the ball to right-center, at any place. So it was a good feeling when he came up, with a man at third,” manager Alex Cora said. “Usually in those situations, opponents] expand the plate and make him chase pitches. But they did not, and he put a great swing on it.”

For the Red Sox, the three-run ninth inning was the second offensive explosion of the night. The first was almost unbelievable.

It came in the top of the second inning, which may well go down as the most frustrating three outs of Blue Jays starter Steven Matz’s life.

Matz quickly retired the first two batters of the inning — Xander Bogaerts by way of strikeout, Rafael Devers via ground out — before finding some trouble.

Christian Vazquez hit a two-out single to left. Hunter Renfroe followed that with a single to right. Then Bobby Dalbec (somewhat masterfully) took a 1-2 curveball to the opposite field, bending it down the line and hitting the right field foul pole for a three-run homer that gave the Red Sox a 3-2 lead.

After a slow start at the plate, the 25-year-old Dalbec is now hitting .316 with four homers, four doubles, 15 RBIs and a 1.103 OPS in his last 11 games.

The Red Sox, though, didn’t stop there. Chavis doubled off the right field fence and then alertly came around to score on Hernandez’s infield single that bled into left field on the following at-bat. Verdugo then singled to move Hernandez to third, and Martinez drove in Hernandez with a smoked single into left.

After seven consecutive hits for Boston, Bogaerts then worked a walk, loading the bases for Devers. At that point, Devers could have delivered a knockout blow to the “home team,” but he took strike three, making his second out of the inning.

The damage, though, was certainly done.

The Red Sox didn’t get a very good start from Nick Pivetta, and they didn’t get a very good relief outing from Hirokazu Sawamura, and they only scored runs in two of their nine innings at the dish.

But when you have an offensive that’s capable of those types of bursts, sometimes that can be enough. Thursday was just one of those nights.

Matt Barnes entered for the bottom of the ninth, striking out the side (with a two-out walk mixed in) to record his 10th save, bouncing back without issue from his blown save on Sunday. Barnes now has 38 strikeouts in 21.1 innings this year.

In winning the series, the Red Sox successfully fended off the Blue Jays, who lost ground in the division and now sit 2.5 games back of Boston. The work, though, is far from finished, as now both the Rays (1 GB) and Yankees (1.5 GB) have jumped ahead of the Blue Jays in the division.

It’s indicative of a division that looks certain to be highly competitive through the summer. The end result is anyone’s guess. But Boston’s first response to a big-time challenge from a divisional foe provides reason to believe the Red Sox will be able to hang with anyone.

“We’re not supposed to be here. Not too many people thought we were going to be in first place — probably at all this season,” Cora said. “So we just keep playing hard, keep playing good baseball, and keep moving on.”