Updated

A candidate for the Democratic Party's nomination for Maryland governor found himself in the middle of a wild party last summer, and now that a picture has surfaced, Doug Gansler has some explaining to do.

A photo of Gansler, the state’s attorney general, apparently reading a text message as teens bearing plastic cups cavort around him, was published by The Baltimore Sun this week. The party took place June 13 in South Bethany, Del., where Gansler claims he stopped to talk to his 19-year-old son about travel plans.

“Perhaps I should have assumed there was drinking going on, and I got that wrong,” Gansler said at a news conference in front of his campaign headquarters. “What I can tell you is that at no time while I was in the house did I see any teenager in any danger or any risk. If I had, of course, I would have attended to that person as I always do and spoken to the chaperones about ending the party.”

Gansler said in hindsight it was "a mistake" he did not do more to see if there was underage drinking. Gansler said he didn’t stick around long.

“I didn't see anything like, that would say, ‘Hey, we need to call the police, this is out of control,’ or anything like that," Gansler said.

But in prior comments to the Sun, Gansler said even if he had seen minors chugging beer, it wouldn't have been his responsibility to intervene.

Gansler starred last year in a public service announcement for The Century Council, an organization sponsored by the liquor industry that fights drunken driving and underage drinking. In the 30-second video spot, Gansler says parents are the leading influence on their kids' behavior when it comes to alcohol, noting, "It's never too early to talk to your kids about smart ways to say, 'No.'"

Council CEO Ralph Blackman said he expects the spot will be withdrawn from the organization's YouTube channel.

"We talk a lot about the mixed messages that parents sometimes send to kids,” Blackman said. “[The Gansler photo] is a bit of a mixed message for us."

Gansler's campaign for the Democratic gubernatorial nomination has been going through a rough patch.

Last week, several outlets reported that Gansler, as the state’s top law enforcement official, has often ordered state troopers assigned to him to drive on the shoulder of congested roads and even let him get behind the wheel. Gansler responded by calling the commander of the state police's executive protection section a "henchman" of Democratic Gov. Martin O'Malley and Democratic Lt. Gov. Anthony Brown, who is running against Gansler for the party's nomination.

The Associated Press contributed to this report.