“He toed the party line, but did I feel he was a zealot? No,” Mr. O’Donnell, who is openly gay, said. “The ones that really hate gay marriage, they don’t ask about your husband every time.”

In 2011, Mr. Molinaro successfully ran for Dutchess County executive, and he was easily re-elected in 2015. Neither victory gathered the attention or curiosity of his election as the teenage mayor of Tivoli, which led to appearances on the “Today” show and the “Phil Donahue Show.”

Mr. Molinaro has recounted the story of that election dozens of times — “I tell the joke, I ran home and asked my mom if it would be O.K. if I ran for mayor” — and he still lives near Tivoli.

His first marriage ended in divorce in 2014, and he remarried a year later to Corinne Adams, whose employment at an architecture firm that received business and subsidies from the county led to accusations of pay-to-play by the Cuomo campaign. Mr. Molinaro angrily denied this, calling Mr. Cuomo a “classless buffoon” for bringing his wife — due with the couple’s second child in late November — into the race.

It was not the first time Mr. Molinaro had thrown punches. He also memorably compared the governor to “the sheriff of Nottingham” and a “deranged Wizard of Oz,” and during last week’s debate he chided Mr. Cuomo for being “born on third base.”

For all of that invective, Mr. Molinaro said he remains proud of the race he has run, describing it as a chance for someone from his world to engage with he called “the power and grandeur and romance” that political world can sometimes contain.

“Listen, there’s only one time that a poor kid gets to run for governor in the State of New York,” Mr. Molinaro said. “How many times does a guy like me get an opportunity to do this?”