California is one of 18 states that
empower law enforcement and immediate family members to petition a court for an gun violence restraining order .
If a court finds that a person poses a significant danger of injuring themselves or others with a firearm, that person is temporarily prohibited from purchasing and possessing guns and required to turn over their guns while the order is in effect.
California Penal Code PART 6. CONTROL OF DEADLY WEAPONS TITLE 2. DIVISION 3.2. Gun Violence Restraining Orders [18100 – 18205]
Complete instructions and all forms needed are on the California Courts web site.