Detroit’s Tomas Tatar beats Capitals goaltender Braden Holtby for the game-winning goal in overtime. (Pablo Martinez Monsivais/AP)

The Washington Capitals were buried by a pile of second-period blows — two Detroit Red Wings goals in nine seconds, their inability to generate any scoring chances, a round of hearty boos from their home crowd — before a three-goal third period pushed a once-hopeless game into overtime.

Red Wings forward Tomas Tatar scored with 2:13 left in the extra period to hand the Capitals a 5-4 loss, but the late push helped Washington salvage a standings point that had once seemed well out of reach. While Detroit scored three goals in that second period, the Capitals generated just two shots on net. And while third-period goals from Brett Connolly, Dmitry Orlov and Nicklas Backstrom — the last with 16.7 seconds left — formed an encouraging offensive surge, the 20 minutes that preceded it were equally discouraging.

“That was the worst [period] of the year by far,” Connolly said of the second. “Guys were not happy in between periods. We’re trying to build our game up here and we’re trying to get points. Obviously, we got a point. It’s a positive, but guys are not happy in the room.”

Sunday gave the Capitals a chance to string together three consecutive victories for the first time since a five-game winning streak connected December to January. The Red Wings, losers of three straight coming in, made that feel very attainable before the puck dropped. They came into the game ranked in the bottom third of the league in goals scored per game, goals against per game and penalty-kill percentage.

And that penalty kill was exposed early Sunday when John Carlson fed a puck toward Alex Ovechkin’s waiting stick in the left faceoff circle. Ovechkin wound up and whacked at it, with that same motion that has produced so many power-play goals from that same spot, and the puck whizzed past Red Wings defenseman Trevor Daley’s right hip, past goaltender Jimmy Howard’s right shoulder and finally past the near post before nestling itself in the net 4:20 into the game.

But the early production was erased by crippling lapses.

Justin Abdelkader scored on a breakaway to tie the score later in the first period, and the dam broke late in the second.

Detroit built a 3-1 lead when Luke Glendening and Anthony Mantha combined for the nine-second blitz, leaving Capitals goaltender Braden Holtby leaning against the crossbar, head shaking slightly, eyes fixed on the video board hanging above the ice.

The board showed the second of the two goals bottled into that short stretch. First, Glendening knocked in a rebound. Next, Mantha took a Henrik Zetterberg feed from behind the net and beat Holtby from the right slot. The Capitals were left chasing a game that was quickly escaping them altogether. As they remained stuck on two shots on goal in the period — just two days after tying a season low with 17 shots on goal in a win over the Columbus Blue Jackets — Tatar’s first goal of the day in the final seconds before intermission stretched the deficit to three heading into the third.

Fans at Capital One Arena were quieted after loud, collective sighs followed each goal, and a “Let’s go Red Wings!” chant echoed from the rafters while a few scattered “Let’s go Caps” cheers petered out. Capitals Coach Barry Trotz said a frustrated Holtby addressed his teammates between periods.

“A lot was said,” Capitals center Jay Beagle added. “It’s not good enough. No one wants to play like that in the second. We knew that wasn’t good enough, and we came out and responded in the third.”

The comeback started with Connolly’s 14th goal of the season, a whistling wrist shot past Howard. Orlov slimmed the Red Wings’ lead to one with 5:58 left, and the Capitals emptied their net as the game clock ticked past the two-minute mark. Their six-on-five advantage soon became six-on-four when Danny DeKeyser went to the penalty box for holding with 1:15 left in regulation.

The Capitals knocked the puck around their offensive zone before Backstrom fired a wrist shot that beat Howard high and sent the arena — dotted with chunks of seats vacated by fans who left early — into a jumping, screaming frenzy.

But those 20 minutes of sound, stirring hockey only went so far.

“The first period was okay, the second period was terrible, and then the third period was probably our best period of the year after our worst period,” Connolly said. “It was just a wild game. It was all over the place. We’ve got to find a balance here of good and bad, for sure.”