Washington: Roger Stone, the longtime adviser and confidante of US President Donald Trump, has been sentenced to more than three years in prison for witness tampering and lying to Congress.

The judge who handed down the 40-month sentence, Amy Berman Jackson, blasted the notorious dirty trickster for his behaviour, describing it as "a threat to our most fundamental institutions, to the very foundation of our democracy".

US Attorney-General William Barr controversially intervened last week to overrule a recommendation by prosecutors in his department of a seven to nine-year prison term for Stone.

Four prosecutors withdrew from the case and one quit the Justice Department altogether following Barr's intervention, which followed tweets by Trump blasting the recommendation.