TOMS RIVER - A judge in Ocean County has sentenced a man who tried to lure a 12-year-old to go to the movies with him to 5 years in prison.

Fifty-six-year-old Mark Allan of Tuckerton pleaded guilty in May to luring.

Prosecutors say Allan handed the girl a note at the Stafford Public Library in February 2014 requesting that they go to the movies. Detectives sent Allan text messages using the phone number on the note.

Allan was arrested when he returned to the library, where he thought he would meet the girl.

In addition to the prison term, Allan must register under Megan's law and faces parole supervision for life.