Lord Kinclaven jailed Neil Scott (39), Ryan Ingleston (25), Andrew Raven (34) and Andrew Weir (27) following a hearing at the High Court in Edinburgh today.
The court heard how the quartet were snared during Operation Pickering which was commissioned after Police Scotland detectives became interested in gangsters from the west of Scotland.
Officers became aware that the four men were selling narcotics in the West Lothian area during the initiative.
After gathering evidence on their activities in November 2015, officers arrested the crooks at various locations in central Scotland on January 5, 2016 and brought them to court.
They found cocaine and cannabis with a total street value of £275,000. The officers also recovered £29,115 in cash which is suspected to be related to the proceeds of crime.
The four criminals pleaded guilty to being involved in the supply of drugs at locations in West Lothian following a hearing at the High Court in Livingston last month. Sentence was deferred to the High Court in Edinburgh for reports.
Today, Lord Kinclaven said he had no other option but to send the men to prison.
Raven, of Linlithgow and Weir, of Bathgate, were both given five years and 10 months. Scott, of Bathgate who has links to Linlithgow, was jailed for nine years and 11 months.
Ingleston, from Cumbernauld, was jailed for three years and seven months.
Passing sentence, Lord Kinclaven said the only sentence available to the court was to impose jail time on all of the men.
He added: “A custodial sentence is inevitable.”