A murderer who struck for the second time was jailed for life yesterday, with a recommendation that he serve at least 30 years.

Joseph McGinlay, 40, is one of the few men in Scottish legal history to have been allowed out of prison to murder again.

He was on weekend leave from Noranside Open Prison, near Forfar, when he strangled 22-year-old Mandy Barnett and stabbed her through the heart in her Edinburgh flat.

When he was 18, McGinlay, from Dalmellington in Ayrshire, was jailed for life at the High Court in Glasgow for the equally savage murder of 16-year-old Mrs Elizabeth Cassidy. He was also sentenced to 10 years for the attempted murder of her friend, Josephine Humphreys, 13.

After a jury at the High Court in Edinburgh found McGinlay guilty unanimously of murdering Miss Barnett, the dead woman's parents spoke of their relief that their nightmare had ended and questioned a system which allowed convicted murderers out to kill again.

Mr Terry Barnett read from a prepared statement: ''This last year of our lives has been a living nightmare which, hopefully, we can now put behind us.

''We are glad that the right verdict has been reached and, hopefully, McGinlay will spend the rest of his life behind bars.

''We feel that the people that let these violent people out for weekends for drink, drugs, etc, should be answerable for their actions.

''Our lives are not going to be the same but now we can start looking forward.''

Both thanked friends and Lothian and Borders Police for the support they had been given throughout the case.

After the jury returned its verdict, they learned from Advocate-depute Michael O'Grady of McGinlay's violent past.

Mr O'Grady highlighted two previous convictions, the first at Ayr Sheriff Court in July 1972, when McGinlay was convicted of assault with intent to ravish and sentenced to two years residential training.

Then, in December 1974, at the High Court in Glasgow, when McGinlay was 18, he was found guilty of murder and attempted murder. The victims were girls aged 16 and 13.

Mr O'Grady added that, when McGinlay murdered Mandy Barnett, he was still serving his sentence for the murder and was on weekend leave.

Lord MacLean told McGinlay his defence counsel had rightly described this as a dastardly crime.

''It ranks amongst the worst he said he had experienced and, indeed, it ranks amongst the worst I have experienced both as a judge and as counsel.''

The death was a brutal one and the motive had not been explained but he inferred from all the evidence, including the state of the dead woman's clothing, that there was some sexual element on McGinlay's part.

''What is clear to me is that she was a stranger to you and wholly innocent in relation to you.''

The only sentence he could impose was life imprisonment but he was empowered to recommend a minimum period McGinlay should serve before he was released on licence.

In this case, he was going to recommend that McGinlay serve at least 30 years.

''Firstly, this is the second brutal murder of a young woman you have committed in your lifetime. Secondly, the second murder was committed while you were in fact still serving a life sentence.

''Thirdly, you may be very intelligent - the indications from the evidence was that that was the opinion some held of you - but you are also wicked and, in my opinion, you present a very serious danger so far as women are concerned.''

The murder hunt which ended in McGinlay's arrest and conviction was launched after Miss Barnett failed to visit her boyfriend John Balsillie in prison.

When police got to her flat in the Fountainbridge area of Edinburgh, they found the victim's partly clothed body. She had been throttled and stabbed through the heart before her body was dumped in the bath.

McGinlay changed his story a number of times but finally admitted having been at the flat in April last year. He claimed he had been passing on cannabis so that Mandy could take it to Balsillie in jail.