ROCKLAND, Maine — A 27-year-old Searsport man will have a felony charge of criminal restraint by a parent dropped in a year if he complies with the previous terms of a custody agreement.

Adam Littlefield pleaded guilty Thursday morning in Knox County Superior to the charge. An arrest warrant had been issued for Littlefield earlier this month when he twice failed to appear for a court hearing. He turned himself in after relatives read the newspaper article about the warrant being issued and informed Littlefield.

Justice Jeffrey Hjelm accepted the plea and the deal proposed by the defense and the district attorney’s office which calls for the felony charge to be dismissed if Littlefield complies with the custody agreement. The custody arrangement calls for the mother to have visitation rights every other week with their 9-year-old son.

The criminal charge resulted after the mother went to police and reported that she had not seen her son from February through August 2011.

Justice Hjelm said that in hindsight this is a matter that may have better been handled by the family court rather than through the criminal court.

Littlefield was released on unsecured bail after the court hearing.

Assistant District Attorney Jonathan Liberman said that the district attorney’s office has been unable to contact the mother and she would have been the key witness if the case had gone to trial. He said that there is no issue about the child’s safety being with his father and the father will retain primary residence custody of the boy.