Martin Lang, 68, Graeme Cullen, 54, Leslie Thompson, 63, and Graham Newall, 49, acted in concert to commit their crimes.
They used a network of companies, including Linear Services in Livingston, to carry out the fraud against His Majesty’s Revenue and Customs (HMRC).
Evidence led in court by prosecutors showed how the companies charged VAT to clients for payroll services but over a 21-month period they failed to hand over the tax they owed to HMRC.
Instead, the money was redistributed from various bank accounts to each of the four accused, as well as to associates and family members.
In total, they stole £8.8m between September 2015 and June 2017.
The money was spent on gold bullion, diamonds, luxury cars, clothes, expensive watches, holidays in Malaga, trips to the Grand National and included plans for a luxury property development in Bulgaria.
Cullen, of Giffnock, Renfrewshire, Thompson, of Bathgate, West Lothian, and Newall, of Edinburgh, were convicted by a jury following a seven-week trial at the High Court in Glasgow of the fraudulent evasion of £8,831,124 in VAT payments.
Thompson was jailed for seven years, Cullen received a six-year sentence while Newall will serve five years and six months behind bars.
Lang, of Cambuslang, was sentenced to four years in prison after pleading guilty to stealing £4,813,493.
Charges for all four accused were aggravated by a connection to serious crime.
Prosecutor Sineidin Corrins, of the Crown Office and Procurator Fiscal Service (COPFS), said:
“This complex fraud was dismantled thanks to the tenacity, skill and dedication of prosecutors and HMRC investigators.
“I hope this sends a clear message to anyone involved in tax fraud that regardless of how complex it may be, we have the skills, resources and the determination to bring you to justice.
“The scale of the prison sentences reflects how seriously we view this offending against the UK tax system.
“Tax fraud is not a victimless crime. It steals money that funds the public services we all rely on in Scotland and the rest of the UK.
“These four individuals have now been brought to account for their crimes.”
The four accused used a number of companies to collect VAT from clients from combined sales of £52m.
Jurors were told that Newall was the architect of the fraud while Thompson was referred to by others as “the kingpin”.
Cullen was introduced into the operation in 2015 and referred to by the others as “the finance guy”.
All four will now be subject to Crown Office confiscation action under Proceeds of Crime legislation to recover monies illegally obtained.