After a sluggish start, the New York Islanders picked up their intensity in the second period and got a needed victory.

Brock Nelson and Matt Martin scored 21 seconds apart in the second and the Islanders beat the Ottawa Senators 3-1 Wednesday night to snap a season-high four-game losing streak (0-3-1).

John Tavares also scored in New York's three-goal second period and rookie goalie Jean-Francois Berube, making just his fourth career start, stopped 22 shots.

"We executed well," Tavares said. "[Berube] was great all game. He was really big for us. He really did a solid job back there."

New York, holding the first wild-card spot in the Eastern Conference, was desperate for a win to strengthen its playoff push after going 1-4-2 in its previous seven games while getting outscored 22-11.

The Islanders pulled within one point of Pittsburgh for third place in the Metropolitan Division and moved four points ahead of Philadelphia and Detroit, who are tied for the East's second and final wild card.

"We're getting ready for the playoffs and obviously we want to get in with good momentum," Berube said. "This is a huge win for us. We put some pucks in the net."

Berube got his second start in nine days to give Thomas Greiss a rest. With starting goalie Jaroslav Halak out for at least the rest of the regular season, Greiss — who has already appeared in a career-high 35 games — is 1-4-1 with a 3.34 GAA in his absence.

Berube made several big saves, including two on one sequence about 6 1/2 minutes into the game, Ottawa's Mark Stone got the puck to Jean-Gabriel Pageau ahead on a rush and Berube slid across to stop his shot.

The rebound came to the left and as Stone swept in, Berube dove across the goal and stopped the puck with his glove.

"It was a big save," Islanders coach Jack Capuano said. "It could have been the turning point of the game. You need your goalie to make big saves. He competed hard. He battled for his space."

Stone scored and Andrew Hammond finished with 20 saves for Ottawa, which lost its second straight after winning three of four.

"I thought we had a lot of perimeter shots, maybe not enough traffic in front," said Ottawa's Bobby Ryan, who played in his 600th game. "We had a few scrums at some point during the game, but definitely not enough."

Stone spoiled Berube's shutout bid at 6:21 of the third period as he took a pass from Erik Karlsson on a 2-on-1 break and scored on a backhand. It was Karlsson's NHL-leading 62nd assist and he is fourth in the NHL with 75 points.

"I thought we came out pretty well, pushed the pace, didn't really give them much room to move," Stone said. "It's just a tough little stretch there that cost us."