AUGUSTA — A Sidney man pleaded guilty Wednesday to a host of charges involving a series of sexual assaults on a 4-year-old girl that he recorded on his cellphone.

The plea by Eric L. Bard, 24, was conditional on several issues being appealed to the Maine Supreme Judicial Court. There is no proposed sentence yet.

The plea deal was arranged during negotiations Tuesday afternoon following the start of Bard’s jury trial in Kennebec County Superior Court.

Defense attorneys Ronald Bourget and Gina Yamartino have maintained that Bard is too intellectually compromised to fully understand that what he was doing was wrong.

During the court hearing early Wednesday, Justice Donald Marden went through the elements of each offense and Bard’s rights to trial and to testify, using simple terms and waiting for Bard’s responses, most of which consisted of one affirmative word, “Yep” or “yeah.”

The judge allowed frequent breaks in the proceeding so Bard’s attorneys could be sure he understood what was happening.

The guilty plea was witnessed only by court personnel, attorneys and two detectives with the Maine State Police.

Bard’s mother, Jeanne, who is usually in the courtroom any time her son is there, was not present to hear him say “guilty.”

Marden explained that if the rulings by the Maine Supreme Judicial Court indicate Marden erred in pretrial decisions, Bard could withdraw the guilty plea. If Marden’s decisions are affirmed, Bard could be sentenced as the judge sees fit.

The 11 charges of sexual exploitation of a minor carry maximum penalties of 30 years in prison; the seven charges of gross sexual assault each carry no upper limits on the penalty since the child was under age 12 when the offenses occurred. The two charges of unlawful sexual contact each carry maximum penalties of 10 years in prison. The single charge of assault is listed as a Class D offense, carrying a maximum penalty of 364 days in jail.

Bard had befriended the girl’s mother in 2010 and baby-sat the girl many times at apartments in Augusta when the sexual abuse occurred. The 21 charges listed in the indictment say the offenses occurred between December 2011 and April 2012.

The investigation began when another mother seeking daycare services for her child in May 2012 came across an ad on Craigslist offering to baby-sit, photograph and bathe children. She reported it to Maine State Police, who learned that Bard has placed the ad.