A man flouted a lifetime driving ban to live in a van and “routinely” drive to wherever he could park up for the night, Dundee Sheriff Court heard.
Police approached Derek Muir, 39, after residents became concerned about his van being parked near their homes with the accused sitting in it.
But he then drove dangerously at speed, mounted a grass verge and forced officers to take evasive action to avoid being struck.
When police eventually tracked him down on Boxing Day last year, Muir, a prisoner at Perth, was found in possession of Class A and Class B drugs.
He was jailed for 18 months by Sheriff Alastair Brown after he admitted a string of road traffic and drugs charges.
Fiscal depute Charmaine Gilmartin told the court Muir was seen sitting in his van and concerned residents thought he might be under the influence of alcohol and called the police.
When officers arrived they spoke to him and the driver was calm, she said.
However, checks revealed he was a disqualified driver and when a second police vehicle arrived the accused started up his engine.
Ms Gilmartin said one of the officers attempted to remove the keys from the ignition but the accused performed a wheelspin and drove off at speed, mounting a grass verge, towards two police officers, who had to take evasive action to avoid being hit by the vehicle.
He narrowly missed a third police vehicle, she said.
The accused was traced on December 26 in his van by police who searched it and found the drugs.
She said amphetamine worth £510, cannabis resin worth £25, cocaine valued at £630 and heroin worth £650 were found.
Muir admitted a charge of dangerous driving on December 19 at Emmock Road and driving at speed on a country road without lights during the hours of darkness, driving while disqualified and without insurance.
He further admitted that on December 26, at police HQ, he possessed cocaine; at Coniston Terrace, he possessed heroin and amphetamine; and on the same date, at the same place, he possessed cannabis resin.
Sheriff Alastair Brown disqualified him from driving for nine years, ordering him to resit the driving test.
He added: “Given that you are disqualified for life that will be academic.”