Ed Conroy’s long coaching career at Rancho Cotate ended with heartbreak Saturday night in Oakland as the Cougars were beaten by Bishop O’Dowd, 37-34, on a last-second field goal.

Trey Miller’s 42-yard kick split the uprights with seven seconds left on the clock to win the NCS Division 3 contest.

Conroy is retiring after 29 years leading the Rohnert Park school’s football program. He’s 59 years old.

Playing a higher seed and away from their home field, the Cougars were underdogs. However, the visitors seemed destined to win in the fourth quarter. They led 34-27 until Bishop O’Dowd tied the score with 2:04 left.

Rancho received the ensuing kickoff but couldn’t get a first down. Following a short punt, the Dragons completed a pass to get in range for Miller’s game-winning kick.

“That was it, put a cap on it,” Conroy said after the game, when asked if he’d reconsidered his intention to retire.

“This was a heartbreaker to lose, but that’s the way it goes.”

It was a back-and-forth game all the way. Bishop O’Dowd jumped out to a 13-0 lead. However, by halftime Rancho had rallied to make it 20-20.

It was 27-27 heading to the fourth quarter.

Quarterback Jake Simmons ran for three touchdowns and passed for another. Two of his scores were inside the 5-yard line and his passing TD to Mason Heinse covered 20 yards.

“I really thought we’d win the game,” Conroy said “We had our opportunities in the fourth quarter.

“I was really happy with how we played. Down 13-0 early to a higher-seeded team and coming back to take the lead in the fourth quarter showed a lot of heart.”

Rancho Cotate, the No. 3 seed, ends the season 9-4. No. 2 Bishop O’Dowd (12-1) earned the right to play for the bracket championship. The Dragons will face Marin Catholic Saturday night.