Mark Johnson, 39, of Northallerton, began to groom with victim when she was 12.
He began a sexual relationship with her when she turned 13.
The police became aware of the offences in September 2018 when Johnson’s estranged wife found messages on his phone which suggested that he was having a sexual relationship with the girl.
His wife confronted Johnson about the messages and told him she was contacting the police.
Johnson immediately wiped the handset and visited a local phone store where he exchanged his device in an attempt to cover his tracks.
He was arrested and initially denied engaging in sexual activity with the victim or exchanging messages with her.
He claimed that the victim was obsessed with him.
Johnson was charged and remanded in custody.
North Yorkshire Police’s Digital Forensic Unit and Force Intelligence analyst examined the telephone and found overwhelming evidence in the form of messages which confirmed that Johnson was having a sexual relationship with the victim.
He pleaded guilty to three counts of sexual assault of a child at Teeside Crown Court on Friday, January 25.
Mr Johnson was jailed for more than five years.
He was given an indefinite sexual harm-prevention court order to prevent him posing a threat to other children.
The terms of the order mean he has to tell police about his whereabouts, such as any holidays or house moves, and if he stays in a house where children live.
He will also have to sign the Sex Offenders’ Register for the rest of his life.
Detective Constable Jason Roper of North Yorkshire Police, said: “Mark Johnson is an arrogant predator who tried to claim that a girl whom he had groomed since she was 12 was lying and was obsessed with him.
“I welcome the sentence which the court has imposed upon him and I hope that this brings some closure to the victim.
“I would like to thank the amazing courage which the victim has shown throughout these proceedings. This has been an extremely difficult time for her. I sincerely hope that with time and continuous support from our partner agencies and her family she is able to rebuild her life.”