Nyamira's Magwagwa MCA Fred Omayio has been released on Sh300,000 bond with a surety of similar amount.
He had been in the cells since Monday last week after his application for bond for the defilement charges he is facing were rejected.
This is after the prosecution cited possible tampering with witnesses.
Omayio was arrested last Saturday morning after a student accused him of defiling her.
She said the MCA diverted her as she made her way to a Kisumu county school.
Resident Magistrate, Alice Towet while granting the bail application on Monday, said prosecution failed to prove beyond reasonable doubt the suspect's release would jeorpadise investigations.
"Liberty is fundamental to any person's freedoms and so far prosecution has failed to show tangible reason to warrant his further incarceration," she ruled.
Omayio has been under police custody for the last seven days pending the ruling .
He was arrested on November 7 after the minor reported him to her parents who later filed a report with the police.
The Ward Rep was accused of engaging in a sexual act and committing an indecent act with a minor contrary to the Sexual Offences Act.
He however denied the charges.
Omaiyo is being represented by lawyer Harun Ndubi.
Hearing of the case will start on October 3.