An Oklahoma man was arrested for allegedly raping a 4-year-old girl in a McDonald's restroom.

The child went to the bathroom in the play area Tuesday afternoon while on a field trip with her day care, Midwest City Police said.

After noticing the girl had been gone for a long time, a day care worker checked on her and ran into Joshua Kabatra, 37, according to a probable cause affidavit obtained by KWTV-DT.

Kabatra unlocked and walked out of the bathroom, saying he was "just washing his hands," the day care worker told police.

The girl, when asked, told the daycare worker and police where the man had touched her, according to the affidavit.

Kabatra later told police he felt sick and knocked on the door before entering the restroom. He said he threw up in the restroom while the child was on the toilet, washed his hands and left, according to the affidavit.

'Where is the justice?':A bus driver rapes, a man keeps girl captive and neither are going to prison

Police arrested Kabatra on two rape complaints and one complaint of lewd acts with a child, KWTV-DT reported.

McDonald's offered its apology in a statement sent to the station.

"At McDonald’s, nothing is more important to us than the safety and well-being of our customers," the company said. "We are deeply disturbed by the incident that occurred at one of our Oklahoma restaurants earlier this week. We are fully cooperating with the police during their investigation."