A CONVICTED killer plotted from his prison cell a brutal gang attack on a man.

Robbie Brown was in HMP Shotts, but became aware via social media that Mason MacKenzie was living in Edinburgh.

The 22 year-old thug then organised for an armed mob to storm the flat Mason was sharing with his girlfriend in the capital's Craigentinny.

READ MORE: Manager of Glasgow petrol station embezzled more than £13k

The victim begged for mercy as one of the gang stated: "Kill him."

Mason was left with a series of horror injuries, but luckily survived.

Brown was back at the High Court in Glasgow where he admitted to an attempted murder charge.

He had previously been found guilty there in 2018 of being involved in the murder of stranger James Watt at a flat in the city's Ibrox.

Brown was later jailed for life and ordered to serve a minimum 16 years behind bars.

He had another five years added for this latest crime.

The court heard how Mason had been living with his partner in Edinburgh having moved from the Inverclyde area.

READ MORE: Driver involved in crash became abusive to cops after refusing to do breath test

Prosecutor Victoria Dow told how the young woman put photos of the couple online, but her lover told her to delete them as he did not want it known he was in the capital.

Brown meantime was serving his life sentence, but learned of the social media pictures.

He then repeatedly contacted Mason's partner demanding to know where he was.

No reason was given during the hearing why Brown wanted the information.

Miss Dow added: "Robbie Brown, thereafter, planned an assault on the man instructing others to carry it out."

The couple were at home on the day of the attack when the young woman was confronted by a masked man as she went for a shower.

The advocate depute: "He produced a large knife from behind his body.

"She initially believed it to be a prank until she saw other masked men enter while holding weapons."

One shoved the woman into the kitchen while the others went for Mason.

Miss Dow: "He jumped off a bed and threw items at the men before wrapping himself in duvet for protection.

"He was then grabbed by the ankles before being struck on the head, body, arms and legs with knives as well as machetes."

One of the mob shouted: "Go for his face, kill him. Stab him in the neck, kill him."

The court heard Mason "pleaded for his life".

The gang then escaped after one stated: "He is dead - let's go."

A 999 call was made and Mason was rushed to hospital.

The court heard he suffered a list of injuries including a skull fracture as well as wounds to his chest, arms and buttocks.

Tony Lenehan, defending, said there was "no mitigation" to be offered for the brutal attack.

Sentencing, Lord Matthews said had Brown been older and convicted after trial, he could have been facing 12 years added to his life-term.

Brown, Paul Green, 34, and Lee Noonan, 24, were all convicted in 2018 of murdering James Watt in his flat near Ibrox Stadium.

Green had recruited strangers Brown and Noonan amid claims James had bottled his father.

The 40 year-old victim was struck with a knife and golf club.

Brown was sentenced to 16 years with both Green and Noonan jailed for 18 years.