The Washington Post's Gene Wang and Scott Allen discuss the Redskins' Week 7 against the Bucs. (Thomas Johnson and Randolph Smith/The Washington Post)

Having called this game a “Code Red” the previous week, Washington Redskins Coach Jay Gruden had no place to go in the lexicon of dire warnings Sunday at Fed Ex Field, where his team fell behind by 24 points in a miserable first half against Tampa Bay.

So he went for volume, erupting in a closed-door tongue-lashing at halftime.

And to the shock of a fast-forgiving crowd of 72,912 that had booed its own on homecoming day, the Redskins staged a furious rally when all seemed lost — reeling off 21 unanswered points, staging a goal-line defensive stand and orchestrating the game-winning drive for a touchdown with 24 seconds remaining for a 31-30 win that capped the biggest comeback in team history.

With the Redskins trailing by six points with 2 minutes 24 seconds remaining, Kirk Cousins completed his first eight throws on the final drive. After two failed shots from the Tampa Bay 6, he got the completion that mattered on third and goal, leading tight end Jordan Reed into the end zone for the decisive touchdown.

And the stands erupted in cheers, as lusty a celebration as the NFL has seen for a 3-4 team.

Gruden, embattled after back-to-back losses dumped the Redskins to the cellar of the NFC East, played down his role afterward.

“It has nothing to do with any Code Reds or any halftime talks,” Gruden said. “This is a player’s game. The players came out and made some plays.”

There were plenty of hosannas to go around following a second half that was as impressive as the first half was hapless.

Trenton Robinson recovered Dustin Hopkins’s perfectly executed onside kick in the 14-point third quarter.

Cornerback Bashaud Breeland made arguably the play of the game, racing from the opposite side of the field to push Buccaneers running back Doug Martin out of bounds at the Washington 5 inside the game’s final five minutes.

From there, Washington’s defense held, permitting only a field goal and giving the offense a chance for the game-winning drive.

And Cousins was as steady as they come on the final drive, exuding calm in the huddle and control on the field. He finished 33 for 40 for 317 yards and three touchdowns, with no interceptions and one sack-fumble in the first half.

“I try to stay like this,” Cousins said, extending his right hand, flat as a table top. “I don’t hit the panic button when things are going bad, and I don’t feel like we’ve got it all figured out when we win. It’s a step in the process.”

Cousins’s 33 completions were a career high, as was his 124.7 passer rating. But it was his poise down the stretch that teammates noted.

“We believed in him,” rookie linebacker Preston Smith said. “On the winning drive, we believed he could score when the time comes.”

Added running back Matt Jones, whose 29 yards accounted for the bulk of Washington’s 50-yard rushing output: “In the two minutes, I just love the way that we just be calm. We don’t panic. We get up and run the next play.”

Signs pointed toward a turnaround Sunday, with the Redskins back on home turf for their annual homecoming game. They also got back three key players sidelined by injury: left tackle Trent Williams, Reed and Jones. And after managing just 34 yards rushing in the previous week’s loss to the New York Jets, they had a clear game plan: Run early and often.

It was a plan that was derailed from the start.

The Redskins opened with a three-and-out, while the Buccaneers opened with a three-and-touchdown in which Washington’s defense gave up a 40-yard score to wide receiver Mike Evans.

Trailing 7-0 before they had gotten warmed up, the Redskins frittered away their next possession, and the first boos of the day rang out.

To that point, Alfred Morris had rushed three times for zero yards. Meanwhile, four of the Buccaneers’ first seven plays gained more than 20 yards.

The Buccaneers’ Connor Barth drilled a 22-yard field goal to pad the lead to 10-0.

Boos rained down as a first quarter of futility came to a close with the Redskins outgained 203 yards to 21. The boos intensified when rookie quarterback Jameis Winston (21 for 29 for 297 yards and two touchdowns) fired his second touchdown pass — a seven-yard strike to Donteea Dye.

After finally mustering at least a semblance of a drive, Cousins was sacked by Tampa Bay’s Jacquies Smith, who forced the ball loose. It was scooped up by Howard Jones, who rumbled 43 yards for a third Buccaneers touchdown and a 24-0 lead.

Washington’s fortunes turned when Cousins started getting the ball to Pierre Garcon, Reed and Jones. Finally in scoring position on the Tampa Bay 8, Cousins faked a handoff to Jones and scooted to his left for the score.

“Hail to the Redskins” erupted as the shutout was averted, with the home team trailing 24-7.

A chance to pare the deficit further before halftime ended on back-to-back misadventures: a drop by Andre Roberts and an illegal-shift penalty that negated a first down on a fourth-and-two completion.

The Redskins headed to the locker room under a cascade of boos.

All season long, the third quarter had been disastrous for Washington, outscored 46-3 in the period. On Sunday, the Redskins came out swinging, scoring 14 unanswered points to get within three.