Matt Niskanen, left, scored twice in the third period to lead the Capitals. (Bruce Bennett/Getty Images)

Matt Niskanen skated with the puck into the right faceoff circle, and then he roofed it past goaltender Jaroslav Halak, his jubilant expression revealing just how stunning a goal it was. Niskanen is the epitome of solid and steady on the Washington Capitals’ blue line, known for his consistency more than doing anything fancy. But that shot was all flash.

“There isn’t that many to pick from, so one of the better ones,” Niskanen said.

The third-period game-winner lifted the Washington Capitals to a 4-2 win over the New York Islanders at Barclays Center on Tuesday night, extending the team’s win streak to five games. For Niskanen, it was his first goal of the season. He didn’t have to wait long for his second, as it came on a Washington power play in the last two minutes of the third period to give him just the second two-goal game of his career.

“Matt is known more for a shutdown role,” Capitals Coach Barry Trotz said. “Any time you get a couple goals, I think that’s a feather in his play. The guys were excited. They were trying to get him the third one.”

With the Islanders and the Capitals tied at 2 through 40 minutes, Marcus Johansson won a battle along the boards, flinging the puck out to Dmitry Orlov by the blue line. Orlov passed it over to Niskanen, his new defense partner on the right side, and then Niskanen’s wrister put Washington ahead just 1:34 into the third period.

Niskanen played in primarily a defensive role for Washington last season, logging heavy minutes against opponents’ top lines. He wanted to maintain that this year while also contributing more offensively as he plays on the Capitals’ second power-play unit.

But while Washington’s blue line has been productive in creating scoring chances it has been slow to score goals, and Niskanen hadn’t tallied one through 26 games this season. Tuesday night’s contest was his second game back after he missed Friday night’s game while being evaluated for a possible concussion.

“It’s nice to see the puck go in,” Niskanen said. “The first one, that’s maybe the best chance I’ve had this year, so I’m glad that one went in at least. My goal is to just keep putting myself in that position so you’re getting opportunities. As a defenseman, you’re going to have a string of luck. I did tonight.”

After Brock Nelson gave the Islanders a lead near the midpoint of the first period, Brett Connolly tied the game for Washington 2:09 into the second . Trotz doesn’t often make lineup changes when his team is on a winning streak, but after Andre Burakovsky struggled against the Vancouver Canucks on Sunday night, Trotz made him a healthy scratch on Tuesday, inserting Connolly instead. Burakovsky, a skilled 21-year-old winger, scored two goals in the first game of the season but has been on a 26-game goal drought since. In his past seven games, he doesn’t have a point.

After being scratched for four straight games, Connolly replaced Burakovsky on the third line and did his best to ensure he wouldn’t be coming out again anytime soon. Jakub Vrana passed a puck up the ice, and Lars Eller beat Islanders defenseman Johnny Boychuk for the puck, flinging it toward the net as Connolly positioned himself in front of Halak. Eller’s shot banked in off Connolly.

Vrana picked up his first NHL assist on Connolly’s goal, and he added to that total later in the second period. On a new-look second power-play unit, Evgeny Kuznetsov drove toward the net on the zone entry and skated behind it, passing the puck into the slot once he wrapped around the back of the net.

Vrana snapped up Kuznetsov’s pass, and the puck went off Justin Williams’s stick to get past Halak 7:37 into the second. The Islanders scored an equalizing goal before the second intermission, setting up a tied third period, where Niskanen stole the show.

Williams had just two goals through 24 games, and he now has four in his past four games. Kuznetsov has an assist in five straight games. Washington’s power play struggled to start the season, but it has now scored 12 goals in the past 13 games. After the Capitals had struggled through the start of December, it seems they’ve now hit their stride.

“It’s a nice little week, 10 days here,” Niskanen said. “At the start of this thing, we weren’t too happy with how we were playing. Guys were having meetings, and coaches were [ticked] and all this, and we still have a pretty good record. It’s better to fix things when you still have a good record. It’s a bit easier. We’re starting to come. Each game we’re playing a little bit better, a little bit better, and I thought we generated a lot tonight.”