KITTERY — Police in Kittery say a young girl has been placed in the care of the state’s child welfare agency after being discovered with a sex offender from Ohio.

Police Chief Paul Callaghan says an officer noticed the man and the girl walking in woods Thursday night near the Rex Motel, and recognized the man from a notification from Ohio authorities.

Callaghan says the man, the girl and the girl’s mother were all interviewed by police, and all staying at the motel.

Callaghan told the Portsmouth Herald that authorities will investigate whether the girl’s mother gave permission for the girl to be alone with the man.

Police did not immediately release the girl’s age.

In Ohio, the man had been convicted of unlawful sexual conduct with a child.

Callaghan says the man, who was not identified, had not registered as a sex offender in Maine but still had time to do so without being penalized.

Regardless of the outcome, Callaghan said he was “very happy” with the quick thinking of Detective Ray Hazen, who recognized the man from notification photos he’d seen.

“It was some excellent police work,” the chief said, according to the Herald.