Mathew Barzal scored one power-play goal and assisted on another, and Semyon Varlamov stopped 40 shots Monday night to give the New York Islanders a 5-4 victory over the Boston Bruins and a 3-2 lead in their second-round playoff series.

The Islanders, who have won two in a row to take their first lead in the series, can advance to the Stanley Cup semifinals in Game 6 at home on Wednesday.

Kyle Palmieri, Josh Bailey and Jordan Eberle all scored in the second period, when the Islanders opened a 4-2 lead. Brock Nelson made it 5-2 just two minutes into the third, after Jeremy Swayman replaced Tuukka Rask in Boston's goal.

But David Pastrnak scored his second of the game two minutes later, and David Krejci brought Boston within one goal with five minutes left in the third period. The Bruins pulled Swayman in the final two minutes for an extra skater, but managed just one more shot to add to their 44-19 advantage in shots on goal.

Boston fans pelted the ice with cups and giveaway towels after what could be the final horn of the season.

Rask stopped 12 of 16 shots before Swayman made his playoff debut to start the third period. The rookie made two saves on three shots - the first on a short-handed breakaway by Eberle.

The Bruins scored first for the fourth straight game, but New York has come from behind to win in three of them.

Pastrnak made up for his open-net miss in Game 4 just 85 seconds into the game on a slap shot into the corner of a well-tended net. Brad Marchand had a goal and an assist for Boston.

Returning home after following a pair of overtime games with a 4-1 loss, the Bruins thrilled a full house that was still arriving when Marchand won a battle behind the net and passed it to Charlie McAvoy at the point before he set Pastrnak up for the one-timer.

More From 92.9 The Ticket