A would-be robber met his match after he forced his way into a pensioner's home armed with a knife.

Ronald Cormack, 70, and his 69-year-old friend tackled 32-year-old Gordon McLeod and bundled him out of the house in Edinburgh.

The High Court in Glasgow heard McLeod, who claimed to be a council worker, barged his way into Mr Cormack's home and threatened him and his friend Jack Cairns.

McLeod went to the house on Lauriston Place in Tollcross at 8.30pm on May 10, 2016, and banged on the windows.

Mr Cormack ignored this and minutes later the door was knocked.

McLeod was at the door wearing a high-visibility jacket and claiming to be a council worker.

He told Mr Cormack he needed inside to turn the water off because there was an emergency and then flashed a fake identity card at him before pushing past.

Prosecutor Jim Keegan said: "Once inside the accused shut the door behind him and a struggle took place between him and Mr Cormack. The accused then produced a knife.

"Mr Cormack took hold of the accused's right hand to prevent him using the knife and shouted to his friend to call the police."

Mr Cairns ran through to help and saw the knife in McLeod's hand. Mr Cormack broke free and ran into the living room.

Mr Cairns then grabbed hold of McLeod and pulled him into the living room saying he was phoning the police.

McLeod tried to grab the phone and Mr Cairns forced him towards the doorway and pushed him out closing the door behind him. McLeod was then seen running off towards Tollcross.

Neither Mr Cormack, nor Mr Cairns was injured in the incident.

In court, McLeod admitted assaulting Mr Cormack and Mr Cairns by struggling with them and intent to steal a mobile phone at a flat in Laurieston Place, Edinburgh, on May 10, last year.

McLeod was caught after CCTV images were released to the media of the man police were looking for.

A number of people, including police officers, named McLeod as the man in the footage.

Judge Lady Scott deferred sentence on McLeod until next month for background reports.