A teenager who was caught in possession of a knife in a street in Leeds has been locked up for six months.
A judge imposed the custodial sentence after hearing how Isaac Manaka has a previous conviction for possessing a knife in public.
The 19-year-old tried to run away when police officers stopped him on Raynville Crescent, Bramley, on May 3 this year.
Leeds Crown Court heard police were called to the area around 6.30pm to a report of a car being driven on false number plates.
The officers saw Manaka walking towards them before suddenly going into the garden of a nearby house.
Lydia Carroll, prosecuting, said the officers followed Manaka into the garden and told him that he would be searched .
Manaka dropped the bag he was carrying and ran off.
He was caught after a short chase and found in possessing of a wooden-handled lock knife.
Manaka was interviewed and told police he was carrying the weapon as he was going to help a friend who had called him and asked for help after his car broke down.
Manaka, of no fixed address, pleaded guilty to possessing a bladed article in public.
The court heard he has a previous conviction for possessing a blade in 2018.
He also has convictions for robbery and supplying class A drugs.
Manaka had been released from custody on licence at the time of his latest offence.
He was recalled to a young offender institution after being arrested.
Kara Frith, mitigating, said Manaka had pleaded guilty to the offence at an early stage.
Miss Frith said the defendant ran away in panic when he saw the police as he knew he would be in trouble for having the knife.
Sentencing Manaka, Judge Simon Phillips, QC, said: "You only have yourself to blame for the position you find yourself in today.
"You have had the good sense to recognise that you had no lawful excuse for possession of that knife."