A man who attacked two lone women in separate incidents in the early hours of the morning has been jailed for six years.

Hamza Ali (22), a Pakistani national, committed the attacks in which he tried to get the women into his car two nights in a row before being caught in a targeted Garda operation.

Ali of Stanaway Road, Crumlin, Dublin, pleaded guilty at Dublin Circuit Criminal Court to false imprisonment and assault causing harm to one woman on June 14th 2017 and sexual assault and false imprisonment of the second woman at locations in Dublin on June 15th, 2017.

Judge Martin Nolan said he had “no idea” what caused Ali to behave in this way, but that he was a menace to society and in particular to young women.

He said Ali had an ambition to sexually abuse the two women in what he described as “frightening” and “insidious” incidents.

Garda David Wogan told Eilis Brennan, prosecuting, that the first woman was cycling home from meeting friends after 3am when a man in a grey saloon car asked her what street they were on.

He told her he was looking for a friend and his phone would not work. She took out her phone, put the street he was looking for into Google Maps and showed him the map. He told her he did not know how to get there so she texted a picture of the map to his phone.

Grabbed her arm There was some general chat before he grabbed her arm and told her he was going to kill her. The court heard he hit her with a tow hook, an iron bar, that he had in the car. He let go of her as a car came and she ran pushing her bike before hiding in a garden when she got tired.

Ali saw the bike and stopped his car. He started talking to her in the garden, saying if she shouted he would hit her. She later told gardaí she was afraid he would hit her with the tow hook again. Ali told her he wanted to have sex with her and then put her bike into the boot of his car, as well her bag and other items belonging to her.

She told him she had dropped her phone while running and he came with her to search for it. He gave it to her after telling her not to call anyone. She remained in fear that she would be hit again so she got into the car. He parked the car and told her he wanted to have sex.

He then took out the tow hook and threatened to hit her again. The woman managed to throw the bar out of the car before getting out herself and running.

She ran to her home where she phoned gardaí­ and gave a description of the man, who still had her handbag. Gardaí found that the phone number she had used to text the man was linked to Ali.

Had a knife Garda James Codd told the court that the following night a woman was cycling home from work at about 4.15am when a man waved at her and told her he was lost. She gave him directions to the city centre before he grabbed her and she saw he had a knife.

He told her to get into the car or he would stab her. She told him to take her phone but he answered that he didn’t want her phone and said he wanted a “blow job”. He threatened her to get her into the car, tried to slash her with the knife and elbowed her in the face but she managed to get away. She ran to a house where she told the occupants a man wanted to rape her and gardaí­ were called.

Gardaí­ set up a targeted operation the next night and followed a car matching the description of the attacker’s car. They arrested Ali and on searching the car found a phone credit card in the name of the first victim.

Unauthorised transactions had also been carried out on the woman’s AIB card and CCTV later clearly showed Ali making the transactions with the card.

Gardai found a car linked to Ali abandoned at a service station some days later. It emerged that Ali had exchanged this car for the vehicle described by the two victims.

Ali has 17 previous convictions, mainly for road traffic offences.

Garda Codd agreed with Seoirse Ó Dúnlaing, defending, that there were no further matters pending against Ali. He agreed the knife had been a retractable-type scalpel or a boxcutter.

Mr Ó Dúnlaing said the offences were extremely serious and the victims were both very brave young women. He asked the court to take into account his client’s early guilty plea, his remorse and that there were no other matters outstanding.

Counsel said he has been instructed to apologise to both the injured parties.

Mr Ó Dúnlaing said Ali had been in Ireland since 2014 as an asylum seeker in the direct provision system. He began a relationship and moved to Norway in May 2017.