Award-winning rapper J Hus has been jailed for eight months for having a knife outside a major London shopping centre.
The music star, appearing in court under his real name Momodou Jallow, apologised and said he regretted his "foolish actions" for carrying the 10cm blade near Westfield, in Stratford, in June.
The 23-year-old, who won best song at the Mobo awards last year, was sentenced at Snaresbrook Crown Court on Friday.
Wearing a black T-shirt and dark jeans while surrounded by three dock officers, the rapper did not react as the sentence was passed.
J Hus, who the court heard has six convictions for 10 offences, had initially pleaded not guilty to possession of a blade in a public place but changed his plea at a further hearing in October.
Her Honour Judge Sheelagh Canavan told him: "You are a role model to many, yet you have failed to leave your past behind you.
"This, in such a young life, is the fourth occasion when you have gone out armed in public with a knife."
In a letter read to the court by his barrister Henry Blaxland QC the rapper said: "My decision to carry a weapon was careless, ill-advised and utterly stupid.
"Being a public figure that many look up to, I simply should have known better."
He said he had not been in his "right state of mind" and spoke of the effect the stabbing of a close friend days earlier had had on him.
J Hus added: "I am in no way trying to justify my actions as they are unjustifiable.
"I am deeply sorry, I regret my foolish actions."
The court heard J Hus had been sitting in his Audi with a female at the wheel and another passenger outside Westfield in Stratford at 12.35pm on June 21 when they were stopped by police.
Prosecutor Helen Owen said there was a smell of cannabis from the vehicle and when asked by an officer if he had anything on him, the star said he had a knife in his pocket.
Asked during the incident why he was carrying what was described in court as a folding knife, he replied: "You know, it’s Westfield."
The court heard J Hus’s friend had been knifed and paralysed just days earlier and the rapper, who was himself stabbed in 2015, had fears he would be the victim of another attack.
Judge Canavan said that while she accepted J Hus had been shopping and had not been trying to provoke a response to the attack on his friend by returning to the area, he must have been aware of the risks.
The sentencing comes amid a wave of knife crime in London and a day after new figures showed the number of criminals being caught with knives or dangerous weapons is at the highest level since the start of the decade.
Judge Canavan said: "The dangers of knives in public places are obvious to us all. Sadly, rarely a week goes by without one or more reports of young men harming, and sometimes killing each other with knives.
"You, better than just about anyone, know the dangers of knives being wielded by young men in public places."
Mr Blaxland said going back to the area with a knife had been a "profoundly stupid" thing to do, but it had not been deliberately provocative.
He said his client’s fame had left him feeling "relatively isolated", adding: "It may be for that reason he found himself drawn back to the Newham area (where he grew up) like a moth to a flame."
Mr Blaxland said J Hus had also suffered mild post-traumatic stress disorder following the attack in which he was injured three years ago.
The rapper’s first conviction, the court was told, was in 2011 when, aged 16, he produced a knife from his shoe in a dispute over a bicycle sale.
A year later he pleaded guilty to violent disorder after two groups of young people clashed at Westfield, and in 2016 he was convicted of offences including affray and possession of an offensive weapon, having been seen chasing someone with a machete and, on another occasion, caught with a large combat knife.
J Hus, of Baldwin Drive, Peterborough, was also ordered to pay a £140 surcharge.
The court also made a criminal behaviour order banning him from entering or travelling through the Newham borough for the next three years and from associating with a number of named individuals.