A Spalding woman armed with a knife racially abused her former friend in the street after discovering the woman was in a relationship with her ex, Lincoln Crown Court was told.
Claire Ellis (23) reacted after she saw her former partner Jordan Berry shopping with Alicia De Sa in Spalding town centre.
Leanne Summers, prosecuting, said that Ellis shouted racist abuse at Ms De Sa.
Ellis continued to be abusive and accused Ms De Sa of stealing her boyfriend and continued to shout racist abuse at her.
Ellis then produced a knife and lunged towards Ms De Sa but was restrained by Jordan Berry and one of his work colleagues.
Miss Summers said that Ellis then spat at Mr Berry and punched him on the back of head.
Police were called to the scene and Ms De Sa and Mr Berry were taken into a nearby bank for their own safety.
Ellis was arrested later and accepted she produced the knife but denied using any racist language.
The court was told that she has no previous convictions.
Ellis, of Roman Bank, Spalding, admitted charges of affray, possession of an offensive weapon and a racially aggravated public order offence as a result of the incident in Bridge Street, Spalding, September 2017.
She was given a 12-month jail sentence suspended for two years together with a 30-day rehabilitation activity requirement and a two-month night-time curfew.
Judge Simon Hirst, passing sentence, told her: “This type of behaviour is utterly unacceptable on the streets of Spalding or anywhere else.”
Mark Watson, in mitigation, said that Ellis was a troubled young woman who, at the time, had a number of difficulties.
He said that since her arrest she has co-operated with treatment for mental health issues and has made considerable progress.