A man was shot in the knee late Thursday as he was urinating in the bathroom of a downtown bar.

Police were called to The Pin at 412 W. Sprague just after 11 p.m. Thursday after a gunshot was heard in the bathroom. The first bouncer to arrive told police he saw a man, later identified as Dylan W. McCauley, standing in the doorway of a bathroom stall with a gun in his hand while the victim lay on the floor, according to court documents.

McCauley reportedly struggled with the bouncer, who said he twisted the gun out of McCauley’s hand and was able to pin him to the ground until police arrived, court documents said. The victim told police that he didn’t see or hear anything before being shot.

One of the officers who responded to the call reported that McCauley repeatedly said “I didn’t mean to do it” and “I just found it,” according to court documents.

Police spokeswoman Officer Teresa Fuller said responding officers weren’t able to figure out whether the victim and suspect knew each other or why the shooting occurred. She said it’s likely police will learn more after further investigation.

“It’s very rare we would just have some random shooting like that,” she said.

The victim’s injuries were not life-threatening, she said.

McCauley, 23, was booked into the Spokane County Jail on suspicion of first-degree assault. His bond was set at $100,000 after a brief court appearance Friday.