A soldier downloaded child abuse images at his army base before threatening to kill police who seized his computer equipment.

Fraser Waddell, 21, of Macmillan Street, Larkhall, South Lanarkshire, who served as a private in the Royal Scots Dragoon Guards, was arrested after police searched his room at the Leuchars base in north east Fife.

The officers, who had come to speak to him about another issue, found 21 indecent images of children on his phone in May last year.

Earlier this year, Waddell avoided jail over an incident in which he pulled over two women on a motorway at 2.30am while pretending to be a police officer.

Dundee Sheriff Court was told some of the images found were at the top end of the scale used to measure such pictures.

A month after the raid Waddell phoned Police Scotland's Dundee headquarters threatening to seek out a specific officer and to kill him and others.

Fiscal depute Sue Ruta told the court: "He was asked to provide the PIN for his phone but said it wasn't his.

"It was found to belong to his ex-partner who said she had given it to him.

"Upon examination it was found to contain 21 indecent images of children in the cache of the Google Chrome browser. Search terms indicated he had actively sought them out."

Waddell pleaded guilty to a charge of taking or making indecent images of children on May 24 last year. He was on two separate bail orders at the time.

His not guilty plea to possessing extreme pornographic images was accepted by prosecutors.

Defence solicitor Paul Parker Smith said: "He left the army on June 2 this year."

Sheriff John Rafferty deferred sentence until later in November for social work background reports and released Waddell on bail.

In January 2017, Waddell was sentenced to 120 hours' unpaid work and a year's supervision over his threats against police.

Waddell called the Dundee HQ and demanded the return of his computer equipment taken during the search at his army barracks room then shouted he was going to "start killing officers" when they refused.

In March 2016, weeks before his child abuse images arrest, Waddell was fined £1000 over the bogus policeman incident.

He followed two women along the M74 before pulling them over while wearing body armour and a peaked cap.

Waddell gave the driver a "warning" but police were called after she became suspicious of him.