A LONGNIDDRY man was spotted running into traffic near to the Meadowmill roundabout.

Brian Haig was seen deliberately entering the B6371 roadway while cars travelled along the road during an incident on October 12 last year.

Haig then attempted to hide from police officers in the undergrowth at the side of the road after worried members of the public reported the man’s behaviour.

But when the officers managed to locate him hiding, Haig then began struggling violently with them before spitting on one of the constables.

The 42-year-old has now been ordered to carry out unpaid work in the community as punishment for his behaviour when he appeared in the dock for sentencing last Monday.

He had previously admitted behaving in a threatening manner and resisting police officers when he appeared at Edinburgh Sheriff Court last month, while three further allegations – including assault, possession of a screwdriver and possession of cannabis – were dropped after the Crown accepted Haig’s not guilty pleas.

Previously, fiscal depute Nicole Lavelle told the court Haig was reported to police after members of the public spotted him “lying by the roadside” at Meadowmill at about 10.15pm on October 12 last year.

Ms Lavelle said: “Officers attended and were met by an ambulance crew who were already there. The crew stated the now accused had been running across the road into traffic in an agitated state.

“The two officers were concerned for the accused’s wellbeing and requested for additional police to attend.

Two police constables conducted a search of the undergrowth of the roadside and observed the accused lying on his side within the undergrowth. He was initially unresponsive and officers sought a response from him by pinching his ear. He appeared to be under the influence of something and appeared dazed.”

The fiscal added that when attended to by the ambulance crew he was “in a volatile state and began shouting and swearing abuse” at the constables.

The court heard that while in the ambulance, Haig said he needed to urinate and asked to go outside to do so, but once outside Haig began “struggling violently” with them and he was subsequently taken to the ground.

Ms Lavelle added that Haig then began “shouting obscenities” towards the constables including statements such as “I am going to s*** your mother in the a***” and “I am going to batter you c****”.

Haig, of Charteris Court, continued to struggle violently with the officers while he was on the ground and during the struggle he then spat on the leg of one of the officers.

He was taken to Dalkeith Police Station, where he continued to shout and swear at police and was too unruly to charge at the time due to his intoxicated state.

Solicitor Stephanie Clinkscale said that her client had “intimated he wished to end his life” at the time of the disturbance but that he “accepts he went too far” with the officers.

Ms Clinkscale said that Haig “had little or no memory” of the incident and had turned to drugs and alcohol after losing his employment in the care sector in 2014.

She added that her unemployed client had now “addressed that problem and he has been sober since October”.

She said: “It seems to be that this has been a wake-up call for him.”

Sheriff Alistair Noble had previously deferred sentence to last Monday for the preparation of bcakground reports.

And when Haig returned to court last week, Sheriff Noble sentenced him to carry out 135 hours of unpaid work in the community.