A drug user who scuffled with four policemen has been given six months to behave himself by a judge.
Dean Kenyon was arrested outside his house in Seaham after arguing with his mother.
The assault of the police officer put Kenyon in breach of a previous suspended sentence for burglary, Durham Crown Court heard.
Judge Jonathon Carroll told Kenyon the next six months is his 'last chance' to behave himself.
Prosecutor Chris Baker said police were called to Kenyon's house in Parkside Crescent, Seaham, at about 5,30am.
"The defendant was arguing with his mother," Mr Baker told the court.
"He was demanding money, storming from room to room.
"Police tried to calm him, but he pushed past them and went out into street where he took up a fighting stance.
"There was a scuffle as police tried to arrest him and take him to the ground.
"An officer suffered a cut finger and grazed knee.
"It took four officers to control him as he kept on struggling.
"When interviewed, Kenyon said he had taken cannabis before the argument with his mother started."
Kenyon, 33, of Parkside Crescent, Seaham, admitted assault of an emergency worker, obstructing a police officer, threatening behaviour, and breach of a suspended sentence, all on April 1..
Amrit Jandoo, defending, said in mitigation: "Mr Kenyon has done well on the suspended sentence order, attending all of his appointments.
"He has a place on a drugs recovery project which may be in jeopardy if he goes to prison."
Judge Carroll adjourned sentence until Nov 12.
The judge told Kenyon: "It is better for you and for society if we can get you off the drugs.
"You have given some indication you may be able to do that.
"I am giving you this last chance to choose your own outcome.
"If you keep out of trouble and continue the drugs treatment, you won't have to go to prison.
"If you do not do those things, you are looking at the two years from the suspended sentence, plus six months for the offences against the police officers."
Kenyon thanked the judge as he left the dock.