The accused was playing with the girl and eventually took her to his apartment and fingered her private part.
Okafor appeared on a count charge of defilement.
The prosecutor, Sgt. Anthonia Osayande told the court that the accused committed the offence at No. 4 Okeya St., Coker, Orile Iganmu Area of Lagos, at about 4.30 p.m. on Dec. 4.
She said the accused, who resided in the same compound with the parents of the alleged minor was playing with the girl and eventually took her to his apartment and fingered her private part.
Osayande alleged that it was when the little girl got back home that she told her parents that the accused touched her vagina.
The prosecutor said that the offence contravened sections 259 of the Criminal Law of Lagos State 2011.
However, the defendant pleaded not guilty to the charge.
The Senior Chief Magistrate, Mrs Ipaye Nwachukwu, granted the accused bail in the sum of N100,000 with two sureties in like sum.
The magistrate said that one of the sureties must be a property owner in Lagos state with evidence of tax payments and address verified.
She adjourned the case till Dec.20 pending the advice from the Department of Public Prosecutions (DPP).