Even when he has a script to follow, Maryland gubernatorial hopeful Douglas F. Gansler is an unscripted sort of guy -- a reporter’s dream and a campaign manager’s challenge.

So it wasn’t entirely a surprise when his response to a question at Wednesday night’s Democratic gubernatorial debate contained this gem: “We parent on the fly.”

Gansler, Maryland’s attorney general, was responding to a question about whether he should have broken up a beach-house party his son attended in Delaware last summer where there appeared to be underage drinking.

Here’s his full answer (the on-the-fly comment comes in the third paragraph):

“So my wife and I have been married for 22 years. We are profoundly proud of our children. That night, I went to tell my child what time he was going to leave the next morning. Could we — could I — have done something different there that night? Absolutely.

“Well, will we say things to our children or do things in the future that we could do differently? Absolutely. As a matter of fact, a few weeks later, I took him to college at Penn. And is there underage drinking at college? Absolutely. I’m not gonna not send him to college, but we worry.

“We parent on the fly. And that was the mistake we made that night.”

Taken in full, the remarks show Gansler and his wife as a caring parents, who like many of their peers constantly debate how much freedom to give their teenage children, frequently making adjustments along the way.

But he’s also a candidate for the state’s highest office — and gubernatorial front-runner Anthony Brown seized the opportunity the debate presented to compare parenting notes.

“I would have stopped the party and made sure that every child got home safely,” said Brown, the state’s lieutenant governor.

He told Gansler: “I, too, am a parent. My 19-year-old daughter’s sitting right here in the audience.”(Gansler’s wife and one of his two sons were there as well.)

Gansler sarcastically responded that he appreciated “the lieutenant governor lecturing me on my parenting skills.” Then he did his best to change the subject.

In an e-mail Thursday morning, Gansler spokeswoman Katie Hill called Brown’s “personal attack on Doug’s parenting” a “desperate” move.

“No one is a perfect parent, and lecturing another parent is totally over-the-top,” Hill said. “Doug is an extremely devoted dad.”

She said Gansler was simply trying to convey the split-second nature of his decision not to intervene at the party — a choice, as he has said, that he would make differently if given another chance.