ROCKLAND, Maine — A state judge ruled Wednesday that a convicted sex offender did not violate probation by attending church where children were present.

Justice Daniel Billings issued his ruling in Knox County Unified Court, allowing 47-year-old Jason S. Simpson to be released. Simpson had been in jail since his arrest on March 26.

Simpson was arrested after his probation officer determined he had violated probation by attending a church service on March 22 in Augusta. A woman reported Simpson to the probation office, voicing concern her grandchildren were in church as well. The report by the probation officer indicates Simpson did not speak with any child while at the church.

Defense attorney Jeremy Pratt said he was pleased with the judge’s decision because his client had done nothing wrong by attending a religious service.

Simpson was convicted in 2007 in Knox County on eight counts of gross sexual assault. Twenty-two other gross sexual assault counts were dismissed. The offenses occurred in 2005 in Thomaston, according to court papers. The victims were a 5-year-old boy and 7-year-old girl. Conditions of his probation included no contact with children.

In March 2014, Simpson was ordered to serve an additional five months in jail when he failed to notify his probation officer he had moved and stopped attending sex offender counseling.