An accountant who gave a false alibi for supergang hood David Sell was today jailed for three years.

David MacFarlane , 61, from Newton Mearns, Glasgow , told a sheriff on oath that Sell was at his home on May 11, 2015.

In fact the criminal was involved in a torture attack.

MacFarlane insisted that the date was correct because it was his sister's birthday.

Sell – a member of Scotland's “most sophisticated” underworld mob – later pled guilty to his part in the horror crime and MacFarlane was charged with perjury.

During a trial at the High Court in Glasgow MacFarlane denied deliberately lying claiming he was “mistaken” about the date of Sell's visit to his then flat in upmarket Thorntonhall, Lanarkshire.

Sentencing him judge Lord Clark told MacFarlane: “There is no suggestion you had any involvement in this brutal and violent offence, but you said on oath he was at your home that day and said you knew because it was your sister's birthday.

Pic shows David McFarlane at the High Court Glasgow

“Your position at trial was that you had made a mistake, however the jury concluded you had deliberately given false evidence on oath.

“As it turned out this had no impact on the case as the accused pled guilty.

“Perjury must be dealt with severely. When an oath is taken to tell the truth that is what must be done.”

The perjury trial heard that Sell was a client of MacFarlane's.

MacFarlane claimed an "agitated" Sell, 51, turn up at his home and told him he had been "threatened by two Irishmen".

The accountant claimed that Sell spent the night and left the next morning.

Sell was later charged with being involved in an attack that saw a man shot in the legs over a drug debt.

MacFarlane told the trial he was then contacted by Sell's lawyer about the meeting at his home.

This lead to the accountant giving a legal "precognition" under oath at Hamilton Sheriff Court in September 2017.

David Sell is a member of Scotland's “most sophisticated” underworld mob

Among several claims, MacFarlane insisted Sell turned up on March 11, 2015.

MacFarlane added: "He said that he had been having problems, but I did not want to know.

"He said that he had been threatened. I told him I did not want to be involved in these issues."

But, just months after he tried to help Sell's defence, the thug pled guilty to the abduction and torture.

He was later jailed for almost 16 years. The crime occurred on the day MacFarlane pretended Sell was with him.

Defence QC Donald Findlay said: “Mr MacFarlane got caught up in something which was not of his making. A decent human being and a decent man is sitting in the High Court.

“He goes out of his way to help other people. By helping Mr Sell he ends up here. It is a sad matter for him.

“This is not a man who poses a risk to the public.”

MacFarlane was found guilty of perjury after trial.

This is not the first time MacFarlane has appeared in court.

In 2013, ex-Rangers striker Shota Arvaldaze won a legal battle to boot MacFarlane out of his luxury home following a £42,000 rent row.