The protesters included supporters of Awiti and those of former Kapisul MP Oyugi Magwanga who had filed the petition.
Trouble started after the youth from one camp accused the others of barring them from accessing the court.
The protesters overpowered the security guards and entered the court compound where they started castigating each other again.
Both groups chanted the campaign slogans and nicknames they used in supporting Magwanga and Awiti during the August election.
"You can't block us from getting into the court because this a public institution. We'll enter by force," a youth shouted.
The situation turned nasty after Awiti's supporters started jeering Magwanga's lead lawyer, Charles Kanjama, when he stood to present his submissions to the court.
A similar incident was witnessed when Awiti's lead lawyer, Tom Ojienda, arrived in the building.
Judge Joseph Karanja was forced to adjourn the hearing for 30 minutes while warning the two leaders to cool their supporters down.
"I'm likely to move this court elsewhere if you cannot control your supporters. We are all straining to hear what is being said because of unnecessary noise," Judge Karanja stated.