MERIDIAN — Gino Mariani dreamt about it the night before.

The longtime Highland football coach envisioned his star kicker making the game-winning field goal against Rocky Mountain in the 5A state quarterfinals.

Ian Hershey made him look like a psychic.

The senior drilled a 45-yard field goal with three minutes and 25 seconds remaining as the Rams erased an 18-point second-half deficit in an improbable 22-21 win over Rocky Mountain Friday night at Brighton Stadium.

Highland (9-2) will play Eagle (9-2) next week in the semifinal round.

“We’ve been preaching in the playoffs how it’s gonna come down to special teams and how it’s probably going to come down to you one of these times,” Hershey said. “So it means a lot to me.”

The win by the Rams not only kept their hopes of a 12th state title alive, but ended a three-game losing streak to the Grizzlies (7-3), including earlier this season. Rocky Mountain edged Highland 12-7 at Holt Arena during zero week on Aug. 21. The Grizzlies had also beat them 29-13 in last year’s quarterfinal round on the exact same field to the date almost and 24-22 in the 2018 title game.

“I told our kids, we exorcised some demons tonight,” Mariani said.

But it looked like those ‘demons’ were going to continue to plague the Rams. After trailing 7-3 at the break, they quickly found themselves in a 21-3 hole less than four minutes into the third quarter.

Rocky Mountain drove the length of the field on its opening possession that was capped by a 30-yard swing pass from Tegan Sweaney to Kade Thompson. Highland quarterback Jack Whitmer then threw the ball right into the hands of the Grizzlies’ Parker Weatherly, who returned it to the Rams’ 14, on the ensuing drive. Hunter Steacker took a pitch and danced into the endzone on the very next play to make it a 21-3 deficit with 8:30 left in the quarter.

“We were thinking, ‘We can’t give up,’” Whitmer said. “There’s always hope.”

Highland got that hope with its first touchdown of the game on a 1-yard run by Eli Parrish. The Rams marched 80 yards in 4:29 to cut it down to 21-10 with 3:21 to go in the third.

Colton George then forced Lucas Leavitt to cough the ball up on the first play of Rocky Mountain’s next possession. The timely turnover gave the Rams first-and-10 at the Grizzly 28. Highland took advantage of the great starting field position with a 14-yard pass from Whitmer to Colton Sneddon to suddenly make it a one-score game at 21-16 with 42 seconds left in the third.

It all set the stage for two big-time kicks for Hershey in the final frame.

Following an incomplete pass at the Rocky Mountain 41-yard line, Mariani trotted out Hershey, whose last attempt was a 53-yard try that sailed wide left at the end of the first half. This was a 58-yard attempt. Hershey’s season long was 50, which he matched earlier in the night on a state record-breaking kick at the 1:08 mark of the opening quarter.

But with the wind at his back, he sailed it in with probably about another five to 10 yards to spare that trimmed the lead down to 21-19 with 8:57 remaining.

“I knew it was going through the uprights,” Whitmer said. “He nails those in practice consistently. He’s been doing it his whole life. I grew up playing against him. I finally got to play on the same team and I could not be happier about that.”

While that kick will probably get most of the attention over the coming days, it wasn’t the game winner. That one came a little more than five minutes later. With wind gusts around 30 miles per hour and the game on the line, Hershey stayed composed and booted it through the uprights almost effortlessly to give the Rams their first lead since late in the first quarter.

“I’ve been working all summer (with) these camps I go to. I get a lot of pressure during (them),” Hershey said. “I’ve really just been preparing for this moment.”

The Grizzlies did threaten by converting on a pair of fourth downs and crossing into the Highland 49-yard line. But the Rams’ defense held up. Kody Colvin sacked Sweaney back at the Rocky Mountain 44-yard before two straight incompletions forced a fourth-and-16 at midfield with less than 30 seconds left.

Swaney completed a pass to Williams. But he was about 10 yards short of the marker and it completed the improbable comeback.

“I’m proud of our guys. We didn’t quit,” Mariani said. “We didn’t hang our heads, and that’s a good football team. These two teams are probably semifinal teams talent-wise. So that’s a big win for us.”