A woman appears to have accidentally fatally shot herself in the head with a gun bought to prepare for possible Ferguson-related unrest, according to sources briefed on the police investigation.

The shooting occurred Friday night in downtown St. Louis, the city's Metropolitan Police Department said, in an area dominated by vacant lots beside a football stadium.

The female victim, identified in a police report as Becca Campbell, 26, was a passenger in a car involved in an auto accident. Her 33-year-old boyfriend was driving, the sources told CNN.

The boyfriend, who wasn't identified, told police that the couple had bought a gun because of fears of unrest related to the pending grand jury decision on the shooting of Michael Brown, the sources said.

He told investigators that as they drove late Friday night, the victim waved a gun, jokingly saying the couple were ready for Ferguson, the sources said.

He ducked to get out of the way of the gun and accidentally rear-ended another car. He said the accident caused the gun to go off and she was struck by a bullet in the head, the sources said.

The victim was rushed to a hospital but died.

The investigation is continuing because police want to be sure the story as told by the boyfriend is correct, the sources said. Police are awaiting gun trace results, as part of the ongoing investigation.