A 66-year-old repeat sex offender who was caught giving sweets to a six-year-old girl has been jailed for six years.

Peter Ashford breached the terms of a sexual harm prevention order banning him from communicating with children and loitering near schools or play areas by giving sweets and painted stones to a six-year-old girl in Gunton Woods and being on a path near Gunton Primary School, Ipswich Crown Court heard.

Judge Martyn Levett said Ashford, of Wellington Esplanade in Lowestoft, had an entrenched sexual interest in young children and he had a duty to protect the public from the harm he posed.

He told Ashford: "You are one of a small cohort of sex offenders who simply cannot avoid coming into contact or communicating with young children despite the efforts of the courts."

Ashford admitted four offences of breaching a sexual offences prevention order and a sexual harm prevention order.

He was also committed for sentence for breaching a sexual harm prevention order and being in breach of a suspended sentence order.

In addition to jailing Ashford, Judge Levett made him the subject of an indefinite sexual harm prevention order.

Godfried Duah, prosecuting, said that in the past Ashford had committed a number of contact sexual offences with children including sexual intercourse with a girl under 16 and buggery.

In 2010 and again in January this year, he was made the subject of court orders aimed at preventing him from being in contact with children.

However on January 24, a public protection officer who was monitoring Ashford saw him in Gunton Woods and discovered he had become friendly with a woman and her six-year-old daughter who regularly walked their dog there.

The officer learned that Ashford had given the girl sweets and had also given her some painted pebbles.

On another occasion Ashford was seen on a path near Gunton Primary school with a man who was holding a camera with a zoom lens.

Steven Dyble, mitigating, said the man with the camera had been taking pictures of a rare plant and there were no children in the immediate vicinity when his client was seen near the school.

He said Bradford had been walking his dog in Gunton Woods when he met the six-year-old girl and her mother and the girl had always been with her mother.

Read more: Sexual offender sent 'disgusting' fantasies to former cellmate to ensure Romanian holidays

Detective constable Matthew Fox, from Lowestoft CID, said: "This is a very positive sentence which will come as welcome news to local residents and the wider community.

"The public protection unit, Scorpion team and CID officers have worked expediently identifying the risk Ashford posed to the public.

"A clear and blatant disreagard has been demonstrated with regards to his indefinite Sexual Harm Prevention Order.

"This same order was put in place by the judicial system to protect the public from predators like Ashford.

"We are very satisfied with this sentence which I hope goes some way to reassure the public of the police stance when it comes to subjects of such orders."