GARDEN GROVE, Calif. (AP) — A man placed in the back of a police car without handcuffs managed to grab an officer's high-powered rifle and fire a single shot through the windshield during a long standoff in Southern California, authorities said.

Nobody was hit by the gunfire and the man eventually surrendered early Wednesday to officers, Garden Grove police said. His name was not immediately released.

The incident began after officers were called to an addiction-recovery home late Tuesday to assist with a man in his 30s who was showing signs of psychosis, police Lt. Carl Whitney said.

The man was placed in the cruiser while officers waited for an ambulance to transport him.

Whitney told the Orange County Register the department will investigate whether the AR-15 rifle was locked and how the suspect was able to get into the vehicle's front compartment and access the weapon.

During the standoff, officers evacuated surrounding buildings, including apartment complexes, and blocked the police car with armored vehicles.

It was unclear whether the man fired toward an officer, Whitney said. No shots were fired by police.

Officers did fire nonlethal projectiles to shoot out surrounding streetlights to darken the scene for tactical purposes, Whitney said.

"We're just happy no one got hurt," he said.

The suspect was jailed on suspicion of discharging a weapon, according to the newspaper.