An attacker who tried to shoot a man three times has been told he faces a lifelong supervision order.

Lee Connors was found guilty at a trial in the High Court in Edinburgh on Wednesday of attempting to murder Grant MacBeth on October 25, 2014, at Barn Park in Wester Hailes, Edinburgh, by aiming a revolver at him and trying to shoot him.

The court heard Connors pointed the gun at Mr MacBeth's face and pulled the trigger three times but the weapon failed to fire.

When police recovered the gun they discovered three bullets in the six chambers of the weapon and that it was capable of firing but was erratic.

Judge Lord Uist told Connors: "This case is about as near to murder as you can possibly get" and deferred sentence for a risk assessment report on the possibility of imposing an order for lifelong restriction on Connors.

The order would mean a court sets a minimum period of jail time and any future release is a decision for the prison authorities. On his release he would then be on a lifelong license and could be recalled to prison if it is breached.

Connors also appeared before Sheriff Alistair Noble at Edinburgh Sheriff Court on Thursday on a deferred sentence after previously pleading guilty to behaving in a threatening and abusive manner in the Castlecliff Hostel in the city in January 2014.

He admitted the charge, which included shouting, swearing and struggling with staff and residents, threatening violence and brandishing a screwdriver.

Defence solicitor Sarah Quinn told Sheriff Noble that sentence had been deferred on her client in regard to the hostel incident for him to be of good behaviour.

She said: "In the meantime he has been in the High Court on indictment."

He was due to appear for sentence at the High Court next month on firearms offences and in June for attempted murder.

The lawyer added: "He is certainly not going to go anywhere in the foreseeable future."

Sheriff Noble told Connors his record and the threatening and abusive offence in the hostel could only attract a custodial sentence but due to the two separate High Court cases, which would result in substantial sentences being imposed, he admonished Connors.