Lawyer Kethi Kilonzo has been locked out of the running for the Makueni Senate by election set for July 26.
The High Court has upheld the electoral commission's decision to block her from contesting the by election on grounds that she is not a registered voter.
However, the court allowed Wiper Democratic Movement to nominate another candidate.
"The Wiper Party has a right to nominate another candidate to contest the senatorial elections in Makueni County," the three-judge bench ruled Friday.
The party has until 8am Saturday to present its candidate to the Makueni County Returning Officer in Wote Town.
In Makueni, residents said they were disappointed with the High Court ruling with some saying they will not vote now that Ms Kilonzo's name is not on the ballot.
"If it is not Kethi, we would rather stay without a Senator for five years and wait until she registers as a voter," said Alice Ndinda, a vegetable vendor at Kikima Market in Mbooni.
Robert Musyoki, a boda boda operator, said Wiper would still carry the day.
"Whoever the Wiper party will present to us, we will vote for him or her, " he said.
Additional reporting by Benjamin Muindi and Lillian Mutavi