Gun-friendly Arizona is trying to avoid deadly encounters between police and people behind the wheel by teaching armed drivers how they should handle themselves when they are pulled over.

PHOENIX (AP) — Gun-friendly Arizona is trying to avoid deadly encounters between police and people behind the wheel by teaching armed drivers how they should handle themselves when they are pulled over.

Arizona, which allows residents to carry weapons without permits, recently changed its rule book for the road in a bid to avoid confrontations such as the one that killed Philando Castile. The Minnesota man, who had a gun permit, was fatally shot during a 2016 traffic stop after telling an officer he was armed.

Arizona is among a small number of states instructing drivers on what to expect during traffic stops. It appears to be the first to use its driving rules to address situations in which motorists are armed.

Democratic state Rep. Reginald Bolding said Castile's death inspired him to seek changes to the state's driver's manual. He said the revisions were necessary because Arizona does not require gun permits and some owners have not been trained to handle firearms.

"The goal was to create a set of standards," Bolding said.

The new edition of the driver's manual, published about a month ago, advises drivers with guns to keep their hands on the steering wheel during traffic stops and tell officers right away that there's a firearm in the car.

It also tells drivers not to reach for anything inside the vehicle without getting permission first. And officers can take possession of guns, for safety reasons, until the stop is completed. The firearms would be returned if no crime has been committed.

Lawmakers in Tennessee, Virginia and Illinois have enacted laws over the last year that require driver education courses to teach people how to react when they are pulled over. Unlike the guidelines published in Arizona, none of the laws explicitly mentions what to do when armed motorists are stopped.

The revision in the Arizona manual would mostly be seen by those who are getting a driver's license for the first time. Most people who move to Arizona and have a license from another state don't have to take a written test. That's also true for Arizonans renewing their license.

The changes in Arizona happened without a law being passed. The Department of Public Safety worked with Bolding to produce the new guidelines.

"It all comes down to safety," said Quentin Mehr, a spokesman for the state police agency.

Arizona's gun laws are less restrictive than other states, allowing people to carry a concealed weapon without a permit in most places. Gun owners are seen with some frequency in public places with guns holstered on their hips.

Will Gaona, policy director for the American Civil Liberties Union of Arizona, said it's not a bad idea to tell drivers what to expect when getting pulled over. But the manual's new section does not include descriptions of a driver's rights, he said.

For instance, the rules say a driver can be arrested for disobeying an officer's order. Gaona said the rule book should tell people that they have a right to refuse an officer's request to search a vehicle.

"You also need to tell them what their rights are — not just what you think they should do, but also what they are allowed to do," Gaona said.

In the Minnesota case, the officer said Castile was pulling out his gun despite his commands not to do so. Prosecutors said the officer never saw the gun because it remained in Castile's pocket until paramedics removed him from his car. The officer was acquitted of a reckless-homicide charge.