A teenager has been ordered to behave after he admitted headbutting a police car.

Niall Carter was told to stay out of trouble until July this year after a sheriff was told about his bizarre assault on the police vehicle.

The 19-year-old also attacked PC Bruno Madureira by spitting at him during the same disturbance in South William Street in Perth on August 16 last year.

Carter, of Shore Road, Perth, admitted acting in a threatening or abusive by kicking and headbutting a police vehicle, shouting, swearing, making threats and struggling with police.

He also admitted that on May 24 in Canal Street, Perth, he acted in a threatening or abusive manner by repeatedly shouting and swearing and challenging others to fight.

Carter admitted standing in the roadway in the path of an oncoming vehicle, causing it to take evasive to avoid colliding with him.

Sheriff Lindsay Foulis deferred sentence for Carter to be of good behaviour and to participate in the Right Track programme for young offenders.

Download: The STV News app is Scotland's favourite and is available for iPhone from the App store and for Android from Google Play. Download it today and continue to enjoy STV News wherever you are.