OREGON CITY, Ore. (KOIN) – The man who had been chatting online with a 14-year-old has been convicted of second-degree online sexual corruption of a child.

Steven James Hilton appeared in Clackamas County Circuit Court on Thursday and accepted a plea deal with the District Attorney’s Office.

As part of the agreement, he was convicted of second-degree online sexual corruption of a child but the charges of first-degree online sexual corruption of a child and endangering the welfare of a minor were dismissed.

According to police, Hilton was arrested after police said he tried to meet the 14-year-old girl for sex.

The investigation began when the victim’s father found the girl’s video messages on Skype.

Police said Hilton performed a sexual act on himself for the child on Skype, encouraged her to send nude photos of herself, discussed meeting in West Linn and possibly going to a hotel for sex.

The incident happened in Nov. 2015.

Hilton was indicted by a grand jury in June 2016.

Details of his sentencing have not been released. KOIN 6 News will update this story when they become available.