The High court on Wednesday dismissed a suit filed by the Council of Governors in a bid to have the law barring party-hopping suspended.
This has in effect dealt a blow to losers in the ongoing political party primaries that has seen big names lose their party
Allowing party-hopping would have given them a lifeline in a bid to seek reelection on August 8.
Justice Chacha Mwita said the law barring party hoping in Kenya is constitutional.
He said it is meant to ensure general elections are free and fair.
The judge, while throwing out the case, said governors failed to demonstrate how the rights of losers will be violated if they are barred from changing parties after losing.
"Persons aspiring for elective offices must embrace systems that promote democratic values and practices that are inconsistent with the spirit and intent of the constitution or an ethical system of candidate selection."
"If an individual is not successfully nominated, his inability to shift his allegiance to another party within the time-frame spelled out by IEBC cannot be said to be a limitation of his rights," Mwita said.
The judge was of the view that individual rights must be where circumstances give way to public interest.
The Council of Governors had moved to the court challenging the new election law.
They said the law contains a problematic unconstitutional section that bars party-hopping as far as 120 days to the polls.