Award-winning rapper J Hus has been jailed for eight months for carrying a knife outside Westfield in east London.
The musician, real name Momodou Jallow, was caught with the blade after police stopped a car near the shopping centre in Stratford in June this year.
Judge Sheelagh Canavan, who sentenced him at Snaresbrook Crown Court on Friday, told the court it was the fourth time he had been caught with a knife by police.
She told the rapper, who has a number of previous convictions: “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 with a knife,” she added.
In a letter read to the court by his barrister Henry Blaxland QC, Jallow 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”, adding the stabbing of a close friend days earlier had affected him.
The 23-year-old 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 the rapper has six convictions for 10 offences.
Wearing a black T-shirt and dark jeans while surrounded by three dock officers, he did not react as the sentence was passed.
Jallow, of Baldwin Drive, Peterborough, initially pleaded not guilty to possession of a blade in a public place but changed his plea at a hearing in October.
He 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.