Chief Magistrate Daniel Ogembo has dismissed the hate speech case against Machakos Senator Johnson Muthama.
In a Thursday ruling, Ogembo said the senator had been charged with the same offence in 2015.
Magistrate Ogembo said it was not fair to have Muthama in custody for four days for an offence he committed in 2015, adding that it was an abuse of court process.
Muthama was among eight Cord and Jubilee MPs who were detained over hate speech in June.
Others were; Moses Kuria (Gatundu South), Ferdinand Waititu (Kabete), Kimani Ngunjiri (Bahati), Timothy Bosire (Kitutu Masaba) and Junet Mohamed (Suna East) who were held up at Pangani police station.
Woman representatives Florence Mutua (Busia), Aisha Jumwa (Kilifi) were detained at Muthaiga police station.