A college tutor has denied defiling his student four years ago.
Daniel Mugo Ndirangu, 28, has been accused of having sex with a girl aged under 18. The victim is now 23.
He denied three counts of sexual molestation and was freed on a Sh100,000 bond.
The two are said to have met at Intel College in Nairobi's Spring Valley in 2014, when the girl was doing a business course.
The girl is said to have turned to her teacher for comfort after she was blackmailed by her former lover.
The prosecution accused Ndirangu of luring the minor to his house before taking advantage of her.
But the court was told that although the girl lived in Ndirangu's house for 10 days after fleeing her home in Mombasa County, he did not touch her.
Although the offences allegedly occurred in Nairobi, on diverse dates from April 26, 2014, Ndirangu is being tried in Mombasa, where his alleged victim lived with her parents.
He said he acted reasonably when the girl came to his house. He also said she did not disclose her age.
The prosecution said the girl was two months shy of her 18th birthday when she was reportedly defiled.
Ndirangu told Resident Magistrate Edgar Kagoni he only offered her refuge when she ran away from an abusive step-father, who he said had tried to rape her. He said he was innocent because she had voluntarily taken herself to his house in Nairobi.
"The accused should be discharged unconditionally. He committed no offence. The girl did not disclose her age to him and out of her own decision, travelled to Nairobi to look for him," said Ndirangu's lawyer.