The trial continues at Canterbury Crown Court
Ashraf Miah was sentenced at Canterbury Crown Court

Police were able to track down a man who tried to rape a student after she managed to record the attack on her mobile phone.

Lillian Constantine, 18, was preyed upon by Ashraf Miah, 34, as she walked home in Ramsgate, Kent using her phone to light the way in the darkness. The Bangladeshi takeaway worker had followed her from a nearby bar as she walked along a dark seafront road.

Miah attacked her under a street light, which it later emerged had been turned off by the council to save money. With her phone in her hand, as she fought off her attacker Constantine was able to capture the horrifying ordeal in a two-minute 47-second clip.

"Out of the corner of my eye, I saw someone. As soon as he touched me on the shoulder, that's when I started to record. Usually, when I walk home I text people. It's also a source of light," she said.

"He came up, asked me where I was going and I said I was going home. And then he started to try to tackle me to the floor. It was like, arms round the shoulders, his leg trying to trip me up, anything he could to try and ground me.

"I had no idea why at first. The first thing that came into my head was he was going to mug me. I was screaming the whole time, 'I'm filming you, I'm filming you. I'm going to call the f***ing police, I'm filming you right now. You are not going to get away with this'."

Local residents heard the disturbance and Miah fled the scene. Constantine managed to scramble the short distance to her home. Using the footage on her phone, police were able to obtain a still of the suspect, who was traced to an address in London.

Sentencing Miah at Canterbury Crown Court, Judge James O'Mahony said watching the "ruthless and determined" assault on film would stay with him for a "very long time".

"In 13 years on the bench, I have seldom heard a more harrowing incident of the brave victim screaming in terror and pleading for it to stop and the awful suffering she endured. If anyone needed a wake-up call as to just how horrific the offence of attempted rape is, then this was it."

The illegal immigrant admitted to attempted rape and was jailed last month for 13-and-a-half years. He must serve a minimum of nine-and-a-half years. He faces deportation at the end of his sentence as the judge told him: "You are highly dangerous ... you have no business being here."

The teenager waived her right to anonymity in order to encourage other victims of sex crimes to come forward.

"It can be hard to fight off a grown man, but if anyone in my situation can grab their phone and try to capture them, you may have more of a chance," she said. "I'm glad I did it. If I hadn't, it would have been someone else in the end."

Putting her ordeal behind her, Constantine intends to begin university in Manchester in September, according to Triangle News. She urged other victims not to allow sexual assaults to limit them.

"Don't put limitations on yourself because it's happened. It may be draining. It may linger, but it won't define you. I don't need to feel ashamed and neither should anyone else."

It is thought to be the first time ever that a victim's own footage of an entire attack has helped put a rapist behind bars.