A man has been given a court order to inform police 24 hours before any sexual contact with a woman, despite being cleared of rape.

Magistrates in York said the man, who cannot be named for legal reasons, was also subject to restrictions online and is required to declare to police any phone he has that is capable of accessing the internet, calling or texting people.

He was acquitted of raping a woman at a retrial in 2015 after claiming that the alleged victim had consented. An interim sexual risk order was granted by magistrates in Northallerton, in North Yorkshire, in December and extended for four months by a court in York.

The order, which was reportedly granted at the request of North Yorkshire police, will expire in May, at which point the force is expected to apply for a full order, which runs for at least two years and can be indefinite.

The BBC reported that the document informs the man: “You must disclose the details of any female including her name, address and date of birth. You must do this at least 24 hours prior to any sexual activity taking place.”

The York Press reported that the man, who is in his 40s, faces a five-year prison term if he breaches the order. The civil order was introduced in English and Welsh law last year and can be handed down by magistrates at the request of police where it is believed that a person who has not been convicted of a sexual crime nevertheless poses a risk to someone else.