A flasher has been jailed after a quick-witted university student used her phone to take a picture of his car as he drove away from the scene.

Martin Lewis is a serial sex offender who had just completed a probation run programme which was supposed to stop his behaviour. That was imposed after he exposed himself to two girls on Exmouth seafront.

Exeter Crown Court heard how a shocked student was walking home from lectures in Exeter when she passed Martin Lewis, who showed her a naked picture of himself and invited her into his car.

She walked away in disgust but used her phone to snap Lewis in his grey Mazda and then called the police, who were able to trace him by his number plate.

The court heard Lewis has convictions for sexual assault, downloading indecent images of children, and exposure and was already being investigated by police for breaking a sexual offences prevention order (SOPO) by posting naked pictures of himself on Twitter.

Inquiries showed he had carried on looking at child abuse images in the internet when he was attending the sex offenders’ treatment programme.

Lewis, aged 48, of Hookhills Road, Paignton, admitted outraging public decency, three, three counts of making indecent images of children, four of breaching a SOPO, and possession of cannabis and amphetamines.

He was jailed for three years by Judge Erik Salomonsen at Exeter Crown Court, who ordered his SOPO and registration as a sex offender to last for life.

The judge told him: “You have done this before and have done it again. You are at very high risk of further offending and it could escalate. Time and time again you commit further offences and you are beyond the help of the probation service.

“If you come out and commit further offence, you will go back to jail.”

Mr Paul Grumbar, prosecuting, said in September 2017 officers from the public protection unit found images where Lewis had posted naked photos of himself on Twitter, carrying out a sex act.

He was found with three phones, of which two had not been notified to police, which contained almost 300 child abuse images. Of these 26 were in the worst category, showing serious abuse by adults, 50 showed less serious acts, and 211 showed child nudity.

The dates of downloads showed he had been downloading them throughout the time he was on the sex offenders course.

He committed the flashing offence on April 14 this year, while he was released under investigation and police were still analysing his phones.

The court heard that Lewis printed out an A3 photo of himself naked and aroused and showed it to a female student as she passed his parked car in Exeter.

Mr Grumbar said: “The window was wound down and the male inside asked her if she would like to get in. She was concerned and distressed and described herself as being freaked out.

“She took a picture of the vehicle on her mobile phone as she walked away. He drove past and shouted that she should delete the picture she had just taken. She said she was going to call the police.”

Lewis has 26 convictions including two previous offences of downloading child abuse images and two of exposure, the most recent being an incident when he flashed at two girls on Exmouth seafront in 2014. This is his third breach of the SOPO.

Mr Barry White, defending, said the public decency offence had involved an image rather than actual exposure. He said there were not as many images as in many cases and there had been no escalation of offending.

He said Lewis’s parents died in December and February.

Mr White said: “He is a sad and lonely man who has one life online in fantasy which sometimes feeds into real life and him committing offences.”