A teenage stalker who carried out a series of terrifying sex attacks - two of them on the same night - was handed a life sentence yesterday.

Thomas Lyons, 17, became the youngest person in Scotland to be given an order for lifelong restriction, keeping him under close watch even after he is freed.

At the High Court in Edinburgh, judge Lord Kinclaven ordered Lyons to serve a minimum of four-and-a-half years, warning him he would only be released when he is no longer considered a danger.

Lyons had just turned 16 when he attacked a 27-year-old woman after trailing her along a street towards her Glasgow home. Like other victims, she was using a mobile phone.

In the days that followed his victims were a 16-year-old girl, a 19-year-old pregnant woman and a 20-year-old.

In court Lyons, of Yoker, Glasgow, pled guilty to four charges of assault with intent to rape.

Lord Kinclaven was told how his first victim was listening to her iPod or talking to her mother on her mobile phone on August 7 last year.

She had opened the door to her close when Lyons grabbed her neck, pushed her against a wall and kissed her - without saying a word.

The woman tried to run but Lyons grabbed the belt of her coat, bringing her down. Lyons ran when she began screaming and swinging her gym bag at him.

Just over two weeks later the 16-year-old got off a bus in Glasgow's west end just after midnight.

As she walked, talking to her friend on her mobile phone, Lyon "swaggered" towards her and began staring.

After a 10-minute walk she reached her home in the Broomhill area of the city. A neighbour looked out of his window and saw a male running towards her.

She had just taken out her keys when Lyons grabbed her and put his hand up her skirt. Her friend heard her screams over her mobile phone.

A man who had been parking his car grabbed Lyons but during the struggle that followed Lyons wriggled out of his T-shirt and fled.

Lyons's 19-year-old victim, who was six weeks pregnant, got out of a taxi in Glasgow city centre in the early hours of September 1 last year.

The court heard that he exposed himself and assaulted her. Two passers-by heard her shouts and went to investigate. Lyons ran away.

Two hours later he attacked the 20-year-old as she walked to her home in the Charing Cross area of Glasgow, again talking on her mobile phone.

He asked about someone he claimed lived in the block then grabbed the woman and demanded sex. She began to scream and hit out at Lyons, who swore at her and left.

Lyons was linked to the attacks by DNA and also picked out at identification parades.

When he returned to court to be sentenced yesterday solicitor advocate Ian Bryce, defending, said Lyons could not explain the attacks.

The new powers were introduced in June 2006 to give judges greater powers to deal with the most serious violent or sexual offences.

The order means that after his sentence Lyons will be monitored and can be returned to custody if he puts a foot wrong.

Previously the youngest person given an order for lifelong restriction was Darren Cornelius, 18, of Edinburgh for a stabbing in the city.