A thief made off with a San Francisco sheriff deputy’s service pistol from a parked car, after the deputy failed to secure the firearm in violation of department policy, Sheriff Vicki Hennessy said Monday.

The break-in was reported at 6:30 p.m. Sunday in the Potrero Hill neighborhood. The off-duty deputy, whom Hennessy did not identify, had left the 9mm Glock 17 handgun in the trunk of a parked rental car, she said.

Department policy states that if a deputy must leave a gun in a vehicle, it must be stored in a metal lock box fixed to the interior of the car and out of public view, Hennessy said. The department has opened an internal investigation into the matter, she said.

“I’m disappointed that the policy wasn’t followed,” the sheriff said. “I am aware of all the issues with auto break-ins, and I am concerned. I reissued the policy again this morning to make sure that people understand it, and I think this is something we have to continually reiterate to our staff and our employees. This is something we can’t take lightly.”

Guns stolen from law enforcement vehicles have been used in a number of shootings in recent years in the Bay Area, as vehicle break-ins continue to skyrocket in San Francisco and other cities. Through the end of July, 17,970 car burglaries had been reported across San Francisco this year, a 28 percent jump from the same period last year.

A revolver taken from a San Francisco police officer’s personal vehicle last month was used three days later in the killing of 23-year-old Abel Enrique Esquivel Jr. in the Mission District. Erick Garcia-Pineda and Daniel Cruz, both 18, and Jesus Perez-Araujo, 24, were charged with murder. The actions of the officer who owned the gun, which was recovered, are under investigation.

In July 2015, a gun stolen in San Francisco from a car belonging to a U.S. Bureau of Land Management agent was used to kill 32-year-old Kate Steinle on Pier 14. In response, state legislators passed a law that requires law enforcement officers to pay fines of up to $1,000 if they fail to properly lock up guns in unattended vehicles — a rule civilians have had to follow for some time.

Under the law, all gun owners must secure their weapons in a locked trunk or in a locked container out of view.

The San Francisco Board of Supervisors, meanwhile, considered passing an ordinance making it a misdemeanor for off-duty law enforcement officers to fail to properly secure firearms in unattended vehicles in the city. But the board ultimately exempted city police officers and sheriff’s deputies, as long as their departments enforced internal policies, while extending the law to civilians.

Hennessy could not comment on whether the deputy could face charges, but said, “The San Francisco Police Department has a report, and they will forward it to the district attorney for a charging decision.”