Washington Capitals defenseman Matt Niskanen (2) is mobbed after scoring the game-winning goal in overtime against the New Jersey Devils. (Jonathan Newton/The Washington Post)

The Washington Capitals clustered together on the home bench as overtime neared, dumbfounded and quiet and wondering how things had gone so wrong. “Pretty down,” defenseman Karl Alzner called the mood. They had spent all Thursday night testing their luck and fiddling with fate. They had ceded a shorthanded strike for the third time this season, went almost 11 minutes before putting a shot on goal during the final period of regulation and wheezed away a two-score lead against a team long since banished from playoff contention.

But now, right before their eyes inside the offensive blue line, 1 minute 13 seconds into overtime, defenseman Matt Niskanen cocked back his stick and rescued them from what seemed inevitable. Most Capitals would later agree they hadn’t deserved to squeak past the New Jersey Devils, 3-2, when Niskanen’s blast skipped through traffic and over goaltender Cory Schneider’s shoulder — not after allowing the tying goal with 29.2 seconds left in regulation.

Still, most also believed the result shoved aside the ugliness, replacing it with the surprising sense of relief.

“That’s the biggest thing,” Niskanen said. “We’d love to play well, play better than we did tonight. But the bottom line is we got a win. We’ll learn that lesson with a win, for sure.”

Count Coach Barry Trotz among the dissenters, particularly after a four-day break gifted the Capitals time to address their secondary scoring woes and tweak their issues, until they promptly squandered it after the first intermission. He graded the decision-making “poor,” the execution “poor,” a 2-0 lead “lucky” and “our resiliency and our determination were average at best.”

The Post Sports Live crew discusses what issues the Capitals need to address before the team likely heads to the playoffs. (Post Sports Live/The Washington Post)

“I know I wasn’t happy with that game, and I know they shouldn’t be,” Trotz said. “If they are, then we’re fooling ourselves. We didn’t play very well.”

After Alzner hissed a blocker-side puck past Schneider at four-on-four during the first period and forward Eric Fehr knuckled his 19th goal early into the second period, the Devils began their slow march back to level, with an old face perched from the visiting bench.

In hosting New Jersey, one of just two remaining opponents on their schedule not in the current playoff chase, the Capitals also welcomed back former coach Adam Oates, who oversaw the franchise’s first postseason absence since 2006-07 before his subsequent dismissal last spring. Oates had resurfaced amid turmoil in New Jersey, one of two assistant coaches tabbed to replace former bench boss Pete DeBoer, fired around Christmas.

Soon, Oates watched his design — Washington’s league-leading 1-3-1 power play — breathe life into his new team. More than 13 minutes passed without action following Fehr’s goal during the second period, until the New Jersey defenseman Jon Merrill got whistled for closing his hand onto the puck and gifted the Capitals a power play, the perfect chance to bury the visitors before intermission arrived.

Instead, after Schneider swallowed a one-timer from forward Alex Ovechkin, after Braden Holtby couldn’t handle Patrick Elias’s shorthanded attempt and Travis Zajac returned the rebound underneath the goaltender’s sprawled leg, the Devils halved their deficit and snapped Holtby’s scoreless streak against them, which had climbed past 148 minutes dating from Dec. 6, 2014.

“Most of the game, we just weren’t sharp,” Holtby said. “I wasn’t sharp at all. What kept us in it was we kept pushing forward. We didn’t get too frustrated with our lack of execution at times. That’s what kept our mind in it that we could still win the hockey game.”

But first, the Capitals skirted danger early into the third period, when a goalmouth scrum dislodged the net from its moorings as the puck flopped around inside the crease. On their bench, the Devils pointed to the video screen and howled that Adam Henrique had nudged the puck past the goal line before the net came unhinged, but replay ruled Holtby had been shoved onto his backside, disallowing the tying goal.

Held without a shot on net until roughly 11 minutes passed in the third period, Washington instead leaned on Holtby until Schneider fled the net, New Jersey gained an extra attacker and Holtby lost sight of Scott Gomez behind the net. When Gomez slipped the tying puck to Steve Bernier, the Capitals’ bench fell silent. Verizon Center groaned. Trotz scowled.

The fury barely lasted.

“Everyone was pretty [ticked off] about that goal going in,” Alzner said. “When you see that go in, there’s no worse feeling and there’s no better feeling than when you do score. Obviously would’ve been nice if we played a better game and won that way, but it’s a little bittersweet, but we got the win, we’re happy.”