BATON ROUGE, La. — A man once known as “Mr. Wonder” to viewers of his children’s television show was sentenced Thursday to five years in prison, nearly four decades after he vanished amid allegations he sexually abused children on a camping trip.

Frank John Selas III, 78, pleaded guilty to one count of indecent behavior with a child before a judge in Alexandria sentenced him, Assistant District Attorney Brian Mosley said in a statement.

With credit for time served since his January 2016 arrest in California, Selas could be eligible for parole as soon as July, his attorney said.

Selas had faced the possibility of life in prison if convicted of two counts of aggravated rape, three counts of sexual battery and eight counts of indecent behavior with a juvenile. All of those charges related to one child who had been on the 1979 camping trip, according to defense attorney J. Michael Small.

Small said the plea deal was a “no-brainer” for Selas, given the potential consequences if he went to trial on Feb. 5.

Mosley said authorities consulted the victim before determining that a plea deal was in the “best interest” of the man and his family, due to the “sensitive nature of this case.” Resolving the case this way also spared them a grueling trial that would have been covered by “countless media outlets,” the prosecutor added.

Small said he believes “justice was ultimately served.”

“While not everyone will agree with the outcome in this case, it is the result of countless hours of meetings and negotiations between prosecution and defense attorneys, all of whom were intimately familiar with the enormous amount of evidence generated during the years long investigation of this case,” Small said in a statement.

In the late 1970s, Selas hosted the “Mr. Wonder” show on KNOE-TV in north Louisiana. He allegedly fled to Brazil in 1979 after parents complained to authorities that he abused their children during a retreat in central Louisiana. By 1985, he had settled in the San Diego area, where he legally changed his name to Frank Szeles. Selas initially claimed that authorities had arrested the wrong person, but a San Diego judge ruled he was the fugitive who had been wanted in Louisiana since 1979.

Selas briefly worked as a news anchor at Monroe-based KNOE-TV, but it was his children’s show that turned him into a local celebrity. It started as a weekly program but went daily as its popularity grew. Often wearing a top hat and tuxedo coat, Selas presided over contests between teams of children bused to the station from local schools.

In San Diego, the man known to neighbors as Frank Szeles was a Cub Scouts leader who advertised swim lessons and other activities for young children from his suburban home in Bonita. Federal marshals found a Cub Scouts cap in his house when they arrested him.

The Boy Scouts of America has said Selas was removed from his position several years before his arrest for failing to comply with the organization’s “youth protection policies and procedures,” after a parent made an unspecified complaint that didn’t relate to scouting. Selas also belonged to a Mormon congregation in San Diego, but the Church of Jesus Christ of Latter-day Saints has said it removed him from “all positions related to children” for failing to comply with the church’s child protection policies.

Investigators in Louisiana believe Selas lived in other places — including Chicago; Darien, Connecticut; South Royalton, Vermont; and Sheffield, Massachusetts — after he returned from South America in the early 1980s.