A motorist who was caught driving dangerously in Inverkeithing cannot remember being behind the wheel that day.

Alan Fraser, 47, of Riverside, Edinburgh, appeared at Dunfermline Sheriff Court.

He admitted that on September 1 on the A921, Admiralty Road, Inverkeithing, he drove dangerously, repeatedly drove on to the opposite carriageway and failed to maintain an adequate stopping distance with a preceding vehicle.

He also admitted that on a journey to Dunfermline police station, he adopted an aggressive attitude towards police officers, repeatedly shouted, swore and made threats of violence towards them.

Depute fiscal Catherine Stevenson said at around 7.15pm police officers saw a motorhome being driven by Fraser. It was swerving about the road and travelling too close to a car in front.

Officers stopped the vehicle and Fraser became abusive. He was shouting, swearing and making threats saying: “You don’t know it. I’ll f*** you up.”

He was arrested and taken to the police station continuing to shout and swear on the way there.

Defence solicitor Aime Allan said: “He has a limited recollection of the offence.”

Sheriff Charles Macnair said that it was “of great concern” that Fraser was claiming to have had a “total black-out” and could not remember driving from Edinburgh to Fife “for no known reason”.

The sheriff called for a medical report and sentencing was deferred until January 31. Fraser’s interim driving ban will continue until then.