A 23-year-old man was found guilty today of pelting eggs at a Tory peer.
Baroness Warsi, now chairwoman of the Conservative Party, was visiting Luton last November when she was attacked.
Gavin Reid, of Green Close, Luton, was sentenced to six weeks in prison at City of Westminster Magistrates' Court today after being found guilty of an offence under the Public Order Act.
Magistrate Elizabeth Roscoe said: "Throwing eggs goes beyond legitimate political protest and is quite clearly disorderly behaviour and it is also threatening, abusive and insulting behaviour."
The court heard Baroness Warsi was confronted by a group of men who hurled abuse and she was then targeted with eggs - one of which smashed and soiled her jacket and hair.
Then shadow minister for community cohesion and social action, she was touring the Bury Park area with a Tory election candidate when the incident happened on November 30.
The district judge told Reid: "It was quite clearly you, and that has been conceded, that threw an egg at Baroness Warsi."
But she acknowledged the argument made by James Walker, representing Reid, that to be found guilty of the offence, prosecutors had to prove his actions had caused "harassment, alarm or distress".
Baroness Warsi, who did not give evidence in the trial, was earlier described as "no shrinking violet" after the court was told she said to the protesters: "I am not fazed. I am a criminal solicitor from Yorkshire."
Politicians tend to be "reasonably robust", Ms Roscoe said, adding: "There has been no evidence to make me sufficiently sure that she (Baroness Warsi) felt any harassment, alarm or distress."
The district judge went on to say that in the wider context of the incident, she concluded Reid's actions did meet the criteria in relation to concerns felt by Janghar Khan, a Conservative member who accompanied Baroness Warsi on the visit.
Ms Roscoe said Reid had already served the sentence during his time on remand since May. But he remains in custody on other matters.
Lady Warsi, who became minister without portfolio in May, is the first female Muslim Cabinet minister.
The Dewsbury-born former solicitor replaced Eric Pickles as chair of the Tory party after the General Election.