However, because 29-year-old Portstewart man Shaun Paul McManus has already served six months on remand, Judge Desmond Marrinan said it would not be in the public interest to return him to jail for a couple of weeks, and freed him.
The Antrim Crown Court judge said on Wednesday that normally McManus' drug dealing would have attracted a sentence of nine years - but in the highly unusual circumstances of his case, given his admissions to police, guilty pleas, and the legislation surrounding those in his situation, he was entitled to more than a substantial reduction in sentence.
McManus, arrested with others last October, following "an intelligence led operation", has recently signed a contract under the Serious Organised Crime and Police Act (SOCPA) to become an 'assisting offender' in return for a reduced sentence.
However, the actual details of that the agreement were not disclosed.
Judge Marrinan said that McManus' previous lifestyle, while financially rewarding, was highly illegal - but he had now taken a completely different course and that one could only imagine the serious toll that dramatic change has taken, not only on his own life, but on that of his family as well.
Prosecuting QC Ciaran Murphy told the court that McManus was involved in both the dealing and distribution of drugs up until the time of his arrest, but had now shown "a willingness to give evidence, if required, against others".
Defence QC Paul Ramsey said McManus had been on one path in life, but had now taken a completely different path which has had high ramifications for him and his family.
Mr Ramsey added that it was recognised that the step McManus had taken has been "at a significant personal cost".
McManus, now in the care of the 'Witness Protection Unit", pleaded guilty to over 20 charges involving the possession, control, supply and attempted supply of Class A, B and C drugs.
Earlier, Mr Murphy revealed that for sometime police had McManus and others, and a number of properties, under surveillance in and around the Coleraine - Portstewart areas, which also led to arrests in Derry.
The lawyer said that following his arrest McManus admitted that between 14 September and October 2010 he had been highly involved in drug dealing.
The court heard that during that period he had been involved in the movement of up to half a million pounds worth of drugs, much of which was recovered by the authorities.
However, in addition to his admissions to those drugs, McManus also detailed his dealings for a man called 'Rab' who first paid him hundreds, then thousands of pounds.
He told detectives of delivering and picking up drugs all over Northern Ireland.
Sometimes he would turn the loads over to others, while on other occasions he himself would "cut the drugs", putting them into smaller packages for onward distribution.
McManus also revealed picking up shipments from lorry drivers coming off various ferries.
However, in all of these earlier dealings, he could only guess at the type of drugs he was handling.
He told police of picking up "white bars" for cutting, which he took to be cocaine, while on other occasions he was given "green bars", which he he thought was cannabis.
Mr Murphy said because McManus was not certain of the type of drugs he was handling on those occasions before his arrest, he was only charged with attempting to possess, control, or supply in those cases of drug dealing.