For the better part of the last decade, the New Canaan Rams have turned their home turf of Dunning Field into a house of horrors for any football team not named the Darien Blue Wave.

The St. Joseph Cadets nearly had their own nightmare there as the Rams erased a 17-point halftime deficit by scoring three quick touchdowns in the third quarter. Instead of going to sleep, the Cadets reawakened in the fourth quarter.

Senior co-captain Jared Mallozzi caught a 46-yard touchdown strike from the Cadets’ new quarterback, David Summers, with 4:57 remaining as St. Joseph knocked off New Canaan, 38-35, in a wild season-opener on Friday night.

“You come in to play the No. 1 team in the state, and you’ve got a big shot to do something good,” Cadets’ head coach Joe DellaVecchia said. “They’re a super, super team; a super program. I don’t know the last time they lost to anybody besides Darien. It’s quite an accomplishment for our kids.”

“It’s one game,” New Canaan head coach Lou Marinelli said. “I take my hat off to them. They just came in here and took it to us. They did a great job. I’m proud of our kids and the way they fought back. I think we have some kids who haven’t played and haven’t been in a fight like this. But it’s okay. We’ll be fine, we just have to regroup.”

The Rams had two possessions after St. Joe’s went up, but the first ended with an interception by Michael Morrissey and the next ended as time expired and the Cadets stormed the field.

The result ended New Canaan’s five-game win streak against St. Joseph, which last beat the Rams in 2010 — a 28-27 decision in Trumbull.

St. Joseph is the first team other than Darien to beat New Canaan since Windsor in the 2012 Class L semifinals, and the first FCIAC team other than Darien to beat the Rams since Trinity Catholic won in overtime, 31-28, in September of 2012.

St. Joseph’s offense did a number on the Rams through the air, as Summers completed 28-of-55 passes for 315 yards and four touchdowns and just one interception. His top target was Mallozzi, an All-Stater who had a huge night with 11 receptions for 165 yards and two TDs, and another 80 yards on kick returns.

“The last time they beat us down here, they had a receiver who is just like Mallozzi,” Marinelli said. “They did a great job. Hes dangerous. Mallozzi especially, but the other kids are skilled, too. They’re never out of a game and they did a great job. They worked all summer long and those kids have really bought in.”

“He’s a phenomenal player,” DellaVecchia said. “I can’t say enough great things about him. He runs all his routes great and he reads defense. Today, they were high-low doubling and he was still getting open. He’s just really good at what he does.”

For New Canaan, quarterback Drew Pyne was 16-of-27 passing for 173 yards and three touchdowns — all to Quintin O’Connell. That combo accounted for touchdowns of 15 and 25 yards in the third quarter, with Pyne running in another TD from eight yards out.

O’Connell had eight catches for 93 yards, while running back Owen Shin made his mark by rushing 12 times for 126 yards and a touchdown, and caught five passes for 33 yards

In the end, the Rams simply had too many miscues. They had two punts blocked, one of which resulted in a TD for the Cadets, turned the ball over twice, and committed a 18 penalties for 161 yards, including three in succession when they had a third-and-one near midfield while leading in the fourth quarter.

“We had our chances, but I don’t know how many yards in penalties we had,” Marinelli said. “We didn’t play well enough to win, and we don’t deserve to win the way we played tonight.”

The Cadets were on point in the first half. Jesse Bike and Mallozzi each caught TD passes from Summers, and David Silas recovered a punt in the end zone for a 21-0 lead.

New Canaan got on the scoreboard when Pyne hit O’Connell for a touchdown in the second quarter, but a 19-yard field goal by Luke Kirby made it 24-7 at halftime.

“We were down 24-7 and at halftime, so it was simple,” Marinelli said. “Just keep on fighting, don’t worry about the score; and play the next play, which they did. I was proud of the way we came back.”

The Rams’ first drive of the second ended with a TD pass from Pyne to O’Connell and, after an interception by Sean Knight, New Canaan struck again to cut the deficit to 24-21. Pyne’s touchdown run then made it 28-24 for the Rams going into the fourth quarter.

The Cadets regained the lead on a 24-yard pass from Summers to Phil Pasmeg, who had four receptions for 50 yards.

New Canaan went back up, 35-31, when Shin ran 69 yards for a touchdown with 10:42 to play, but six minutes later, Summers connected to Mallozzi for the winning TD.

The win helped wash away a little of the bad taste from the Cadets’ loss to Hillhouse in last year’s state final, when they were ahead at halftime and then steamrolled in the second half.

“We have a chip on our shoulder from how last season ended when we were up at halftime and we didn’t finish the job,” DellaVecchia said. “We’re in Class S and we know it’s going to be difficult to get in the playoffs with the schedule we play, so every game is big for us.”

St. Joseph 38, New Canaan 35

First Quarter

SJ - Jesse Bike, 5-yard pass from David Summers (Luke Kirby PAT), 9:24

SJ - Jared Mallozzi, 22-yard pass from Summers (Kirby PAT), 3:48

Second Quarter

SJ - Dave Silas, recovered blocked punt in end zone (Kirby PAT), 6:46

NC - Quintin O’Connell, 6-yard pass from Drew Pyne (Grant Morse PAT), 4:31

SJ - Kirby, 19-yard field goal, 0:00

Third Quarter

NC - O’Connell, 15-yard pass from Pyne (Morse PAT), 10:39

NC - O’Connell, 25-yard pass from Pyne (Morse PAT), 7:59

NC - Pyne, 8-yard run (Morse PAT), 2:44

Fourth Quarter

SJ - Phil Pasmeg, 24-yard pass from Summers (Kirby PAT), 11:02

NC - Owen Shin, 69-yard run (Morse PAT), 10:42

SJ - Mallozzi, 46-yard pass from Summers, 4:57