Boston Bruins' David Pastrnak (88) celebrates his goal in front...

Boston Bruins' David Pastrnak (88) celebrates his goal in front of New York Islanders' Ryan Strome (18) during the second period of an NHL hockey game in Boston, Saturday, March 12, 2016. The Bruins won 3-1. Credit: AP/ Michael Dwyer

BOSTON — It wasn’t a loss until David Pastrnak beat Thomas Greiss for a second time on Saturday, a shot through the Isles goaltender with 2:34 to go that made it 3-1 Bruins.

But the Islanders lost this crucial game in the closing seconds of the second period, when Johnny Boychuk’s failed clearing attempt turned into Pastrnak’s first of the afternoon, a slam-dunk from a few feet in front of Greiss after a feed from David Krejci.

That goal, with 8.9 seconds left in the middle period, broke a 1-1 tie and broke the Isles’ will a bit. They played gamely in the third but it’s hard to peel points off playoff-bound teams like the Bruins when trailing this time of year, so the Isles suffered just their second regulation loss in the last 12 games.

“It can be a little frustrating when you’ve tied it up and you’re feeling pretty good about yourself with a chance to get it to the third at 1-1,” said John Tavares, whose backhand over Tuukka Rask at 10:48 of the second evened the game and was Tavares’ 200th NHL goal. “You’re still within a shot, but it didn’t seem like things were coming easy today.”

The most frustrating part of that late second-period goal was how the play began — a faceoff in the Bruins zone with 45 seconds to go. After a misfire of a first period in which the Isles were outshot 14-5 and surrendered a power-play goal for the fifth time in the last six games, they were moving better and cycling well to pull even.

Boychuk and Nick Leddy each pinched at separate times inside of those last 45 seconds, clearly pushing a bit more than normal with the clock winding down. But the puck made its way back below the Isles goal line and Boychuk tried to sky one out of the zone.

Loui Eriksson easily picked it off, though, and Krejci batted down Eriksson’s pass and went to work. Boychuk followed Krejci around the zone and Pastrnak sat right where Boychuk would have been, beating Greiss (28 saves) for the gut punch.

“We had the same play in Toronto,” coach Jack Capuano said, referring to a failed clear before the Leafs’ late tying goal in regulation. “We have to learn that you have to manage the puck better or you’re not going to win. End of story.”

Greiss was especially sharp in the first, holding the fort as the Isles’ defensemen struggled continuously with breakout passes against an aggressive Bruins forecheck. But the Islanders’ new No. 1 goaltender has allowed three goals in consecutive games since Jaro Halak went down, something he’s only done once this season.

“We changed a little structure after the first and I thought our guys did a pretty good job in the second and third,” Capuano said. “We had the puck on our stick at the end of the second. I thought we could’ve gotten out of there tied.”

The Islanders’ busy schedule does not let up, with the Panthers coming to Barclays Center on Monday before games in Pittsburgh on Tuesday, Nashville on Thursday and Dallas on Saturday. So the level of competition won’t let up, either.

More Islanders