Washington Redskins quarterback Kirk Cousins (8) congratulates tight end Jordan Reed (86) after Reed scored the tying touchdown during the second half of an NFL football game in Landover, Md., Sunday, Oct. 25, 2015. The Washington Redskins defeated the Tampa Bay Buccaneers 31-30. (AP Photo/Patrick Semansky)

Washington Redskins quarterback Kirk Cousins (8) congratulates tight end Jordan Reed (86) after Reed scored the tying touchdown during the second half of an NFL football game in Landover, Md., Sunday, Oct. 25, 2015. The Washington Redskins defeated the Tampa Bay Buccaneers 31-30. (AP Photo/Patrick Semansky)

Washington’s NFL team overcame its usual third quarter woes to beat the Tampa Bay Buccaneers, 31-30, in the biggest comeback in franchise history on Oct. 25 at FedEx Field in Landover, Md.

After back-to-back losses on the road to Atlanta and the New York Jets, Washington head coach Jay Gruden called Sunday’s game against Tampa Bay a “code red” situation. Still, Washington was optimistic about turning around its inconsistent season, with the team getting back two key offensive starters—tight end Jordan Reed and left tackle Trent Williams—who’d been sidelined with concussions.

However, things got off to a bad start after the offense went three-and-out on their first drive, while Tampa Bay quarterback Jameis Winston and wide receiver Mike Evans connected for a 40-yard touchdown on their first series.

Tampa Bay continued to dominate Washington as rookie wide receiver Donteea Dye caught a 7-yard touchdown pass from Winston in the second quarter. Tampa Bay’s defense also got in on the action, recovering a fumble by Washington quarterback Kirk Cousins for a touchdown. By halftime, Washington trailed Tampa Bay, 24-7.

Washington’s NFL team is notorious for playing terrible in the third quarter, but on Sunday, Cousins orchestrated a potential season-saving comeback in the second half.

On Washington’s first offensive drive of the half, Cousins threw a beautiful pass to wide receiver Andre Roberts for 38 yards. A “roughing the passer” penalty moved Washington to Tampa Bay’s 7-yard line, first and goal. Two plays later, Cousins connected with receiver Ryan Grant for a touchdown to bring the team within 10 points.

On the next play, Washington recovered an onside kick to regain possession at midfield. Seven plays and 51 yards later, Reed found his way to the end zone and cut the deficit to just three points, 24-21.

Washington continued its big play offense in the fourth quarter to win the game. Trailing 30-24, Washington got the ball at its own 20-yard line with about two minutes to play. Cousins threw on every play, and capped off the game-winning drive with a 6-yard touchdown pass to Reed.

The oft-injured Reed played a huge role in the win, finishing with 11 receptions for 72 yards and two touchdowns.

Cousins completed 33 of 40 passes for 317 yards, three touchdowns and zero interceptions. He also ran for an 8-yard touchdown in the second quarter.

Winston, the No. 1 overall pick in the 2015 NFL draft, finished 21 of 29 for 297 yards and two touchdowns.  Evans had eight receptions for 164 yards.

Linebacker Ryan Kerrigan suffered a fractured right hand in the second quarter.

The win against Tampa Bay brings Washington’s record to 3-4 heading into a bye week. On Nov. 8, the team will travel to New England to face the undefeated Patriots.