Following a two-year absence, the Ridgefield football team is headed back to the state playoffs.

A strong start and a good finish did the trick as the Tigers defeated Danbury, 36-21, on Wednesday evening in the final regular-season game for both teams.

With the victory, Ridgefield (8-2) clinched one of the last berths in the eight-team Class LL playoff field.

“It’s a testament to our program, and the seniors,” Ridgefield coach Kevin Callahan said. “Any time you are practicing after Thanksgiving it’s kind of hallowed ground.”

The Tigers opened the game with three unanswered touchdowns to build a seemingly safe 20-0 lead with under five minutes left in the first half. But Danbury (5-5) answered with two quick scores and a two-point conversion to close within 20-15 at the break.

Ridgefield, however, regained its mojo at the beginning of the third quarter. After receiving the second-half kickoff, the Tigers embarked on a sustained drive that culminated in Max Bornstein’s 1-yard touchdown run. Xander Scavone ran in the two-point conversion, putting Ridgefield ahead 28-15 with 7:58 left in the third quarter.

“Danbury is a very good team, so I knew it wasn’t going to stay 20-0,” Callahan said. “It was important for us to put together that drive at the start of the third quarter. The kids were hanging their heads a little at halftime.”

Led by lineman Reid Englert, the Ridgefield defense held the Hatters scoreless in the second half until late in the fourth quarter. Englert finished with three sacks and added several tackles for losses.

Ridgefield extended its lead to 36-15 when quarterback Owen Matthews hit Owen Gaydos with a 33-yard touchdown pass and Kai Prohaszka added the two-point conversion run with 9:26 left in the final period.

Danbury ended the scoring on Patrick Rosetti’s 52-yard touchdown pass to Malachi Hopkins with 1:39 left. The Hatters failed on the two-point try, and after Gianni Gorham recovered the onside kick the Tigers ran out the clock.

Ridgefield had a sweet start, taking a 6-0 lead when Prohaszka burst 72 yards up middle for a touchdown.

Hopkins returned the ensuing kickoff 40 yards and Danbury picked up a first down on a completion. But a fumble at the end of a completed pass was recovered by Alex Hanna, giving Ridgefield the ball at its own 44.

After a screen pass to Gaydos for nine yards, Matthews threw behind the line of scrimmage to Declan McNamara, who unloaded a 50-yard TD pass to Gaydos. Scavone ran in the two-point conversion and it was 14-0 with 6:09 left in first quarter.

Danbury turned the ball over again on it next possession. A 41-yard pass completion from Patrick Rosetti to Artez Taft gave the Hatters a first down at the Ridgefield 18. But on a third-and-five from the Tigers’ 13, Danbury fumbled on the snap and Dean Habeeb recovered for Ridgefield.

The Tigers pushed their lead to 20-0 when Gaydos made a great catch in the end zone and got a foot down for a 12-yard touchdown with 4:44 left in the half.

But just as it seemed that Ridgefield was headed for an easy victory, the Hatters responded with two scores.

A 43-yard pass from Rosetti to Xavier Ross set up DJ Donovan’s 2-yard touchdown run, and Donovan added the two-point conversion, trimming Ridgefield’s lead to 20-8.

Danbury then surprised Ridgefield with a nicely executed onside kick that the Hatters recovered at their own 44. Two completions and a pass-interference penalty got Danbury to the Ridgefield 22, and the Hatters used a trick play of their own to get another touchdown as Rosetti threw behind the line to Hopkins, who lofted a 22-yard pass to a wide-open Bernie DeLaCruz in the end zone.

The extra point got the Hatters within 20-15 with 24 seconds left in the second quarter.

But Ridgefield reasserted itself at the start of the third quarter and guaranteed that the end of the regular season would not mean the end of the season.