LONG BEACH, Calif. (KTLA) — A man with stab wounds was arrested on suspicion of trying to rape a girl at a Denny’s in California on Sunday, authorities said.

Officers responded around 1:39 a.m. after getting a call about a sexual assault involving a minor, the Long Beach Police Department said. A good Samaritan had noticed what was happening with the girl and sought help.

Several people then detained the man until police arrived. The officers discovered he had stab wounds on his body.

The man, identified as 33-year-old Jimmie Kirkwood, was then taken to a local hospital for treatment.

“At this time, it is unknown if the suspect sustained injuries during this incident or during an unrelated incident; the investigation to determine how he sustained the injuries is ongoing,” Long Beach police told KTLA in a statement.

Kirkwood was booked on suspicion of lewd and lascivious acts with a child under 14 years old, assault with the intention to commit rape, and false imprisonment, according to police. His bail was set at $100,000.

It’s unclear where in the restaurant the alleged assault took place.

The investigation is underway and no further details were immediately available.