WEST BATH, Maine — Under conditions of a plea agreement, a 60-year-old Bath man charged with 19 counts of sex crimes against a child will serve two and a half years in prison followed by four years of probation.

Kenneth Bailey was sentenced earlier this month by Superior Court Justice Daniel Billings. If Bailey violates his probation, he could serve up to an additional eight years in prison.

In April 2014, a Sagadahoc County grand jury indicted Bailey for six felony counts of unlawful sexual contact against a child, 10 felony and misdemeanor counts of visual sexual aggression against a child and three counts of unlawful sexual touching.

The crimes took place in Bath between 2011 and 2013, and involve one victim, Deputy District Attorney Jonathan Liberman said at the time. According to court documents, the child was younger than 12 years old at the time of many of the crimes.

But Bath police were unable to locate Bailey to arrest him, and he remained at large for two years before turning himself in to Sagadahoc County deputies last year.

At a June 6 arraignment, Bailey pleaded not guilty to all 19 charges, according to court records.

Since then, a plea agreement was reached. On Jan. 4, Billings sentenced Bailey.

Conditions of his probation will include sex offender treatment to the satisfaction of the probation department, and Bailey will be required to register as a sex offender.

Liberman told Billings he had been “in close contact” with the victim’s family throughout the case and had discussed the pros and cons of the case going to trial versus a plea agreement.

“Taking into account the benefit and risks, and that this involves Mr. Bailey accepting responsibility without having to put the victim through a trial, I believe this is something we all could support,” he said.