A woman who originally told officers she was shot by an unknown assailant later admitted her boyfriend accidentally shot her while showing her a gun in her apartment Saturday night, Oceanside police said.

The woman called 911 and said she’d been standing in front of her apartment building on Edgehill Lane near Oceanside Boulevard when she was shot in the leg about 9:30 p.m., Oceanside police Lt. Taurino Valdovinos said. But investigating officers soon started to question her story, the lieutenant said.

They searched her apartment and found evidence that the shooting had taken place inside. The victim ultimately told officers that her boyfriend was showing her a gun when he accidentally shot her, Valdovinos said.

She was taken to a hospital with an injury that wasn’t life-threatening.