PHILADELPHIA -- The New York Islanders moved within one point of first place in the Metropolitan Division with a 4-2 win against the Philadelphia Flyers at Wells Fargo Center on Saturday.
Josh Bailey scored his first of two goals to give the Islanders a 3-2 lead with 3:57 remaining in the third period and move them closer to the first-place Washington Capitals. Robin Lehner made 22 saves for the Islanders (43-25-7), who had been shut out in their past two games.
"Wasn't like we didn't deserve to score goals the last couple games," Bailey said. "Obviously certain areas we need to be better in. Sometimes it's a break here and there that can be the difference and open things up for you."
[WATCH: All Islanders vs. Flyers highlights]
The Flyers (36-31-8) are seven points behind the Montreal Canadiens for the second wild card into the Stanley Cup Playoffs from the Eastern Conference. Robert Hagg and Shayne Gostisbehere scored, and Carter Hart made 36 saves.
"Bad feeling right now," Hagg said. "They played better than us the whole game. We didn't deserve to win today. Right now, it's a terrible feeling."
Bailey broke a 2-2 tie with his first goal in 13 games. He stole the puck from Hagg along the wall on the right side of the Philadelphia zone and beat Hart to make it 3-2.
Video: NYI@PHI: Bailey goes top shelf for go-ahead goal
"Was just trying to shoot it hard and high short side," Bailey said. "The angle wasn't great. Sometimes you need a little bit of luck to get it in the back of the net."
He scored his second of the game to make it 4-2 at 17:26.
Hagg gave the Flyers a 1-0 at 6:39 of the first period when his shot off the end boards bounced off the stick of Islanders forward Casey Cizikas and past Lehner. It was Hagg's first goal in 39 games.
Video: NYI@PHI: Hagg scores after puck caroms off end boards
Brock Nelson scored the Islanders' first goal in three games when he knocked a puck out of the air past Hart to make it 1-1 at 14:27 of the first. It ended New York's goal drought at 134:27, dating to Nelson's goal in overtime against the Minnesota Wild in a 3-2 win on Sunday.
"Obviously tough bounce (on Hagg's goal), one we'd like to have back," Nelson said. "When things aren't going your way, you can sit back and think, 'Here we go again.' I think everyone did a good job getting back skating, keeping it simple. We had some good [offensive] zone time, had some good looks, were able to get that one and I think that was a big one for us."
Nick Leddy put the Islanders ahead 2-1 at 10:58 of the second period when he one-timed a pass from Mathew Barzal past Hart.
Video: NYI@PHI: Leddy blasts one-timer past Hart
The Islanders had a chance to build their lead with a 5-on-3 power play 2:16 into the third period when Ryan Hartman was called for interference and Jakub Voracek was given an unsportsmanlike conduct penalty for arguing the call, but New York got two shots on goal and was 0-for-5 on the power play, including a 41-second 5-on-3 chance in the first period.
"It's something we've been working a lot on and talking a lot about," Bailey said. "You get a full two minutes on the 5-on-3, you've got to capitalize, especially at that time of game and we didn't. Had some looks, their goalie made some saves. But we've got to find a way to be better in those situations and put one in."
Philadelphia responded with a power-play goal by Gostisbehere at 6:16 of the third to tie it 2-2.
"When we tied it up there I thought we were in control and it wasn't the case," Flyers forward Claude Giroux said.
They said it
"After two periods it should have probably been 5-1, 6-1. We had two [goalposts], two knobs, just not bouncing in for us. It was huge by [Josh Bailey] there in the end to score that goal. It was a good game." -- Islanders goalie Robin Lehner
"I don't think we were moving well enough in the second period to give ourselves a chance to do something. ... If you don't move you're chasing always. When you have the puck you don't have the space to make a play, you don't have the time to make a play, so you've got to get rid of it. And then you're chasing again. That's what happened." -- Flyers forward Jakub Voracek
Need to know
Boychuk had an assist, five shots on goal and played 17:32 in his return to the lineup after missing the previous six games with an upper-body injury. ... Giroux and Couturier each extended their point streak to five games with assists on Gostisbehere's goal. Giroux has seven assists during his streak, Couturier has eight points (three goals, five assists).
Islanders: Host the Arizona Coyotes on Sunday (Nassau Coliseum; 3 p.m. ET; SN, MSG+, FS-A, NHL.TV)
Flyers: At the Washington Capitals on Sunday (12:30 p.m. ET; NBC)
Video: Bailey paces Islanders to 4-2 win against Flyers