A four-hour standoff between California police and a suspected shooter ended with the suspect jumping out a second-floor window, according to authorities.

Anaheim Police Department officers responded to a call of a shooting at about 1 a.m. and found a shooting victim, according to Sgt. Shane Carringer of the Anaheim Police Department.

PROTESTS IN WISCONSIN AFTER WAUWATOSA POLICE SHOOTING INJURES WOMAN

The suspect proceeded to barricade himself in a second-story apartment. The suspect indicated that he would not surrender peacefully, police said.

A SWAT team arrived shortly after 5 a.m. and used “chemical agents” to “encourage the suspect’s surrender," according to police.

After leaping through the apartment window, the suspect landed on a parked car, where police were able to arrest him with help of a police dog.

It is unclear if the suspect sustained any injuries, but after an examination at the local hospital, he will be booked for charges of attempted murder, assault with a deadly weapon and various weapon charges, Carringer told Fox News.

CLICK HERE TO GET THE FOX NEWS APP

The victim, a male in his 20s, suffered a gunshot wound to the face. He was transported to a hospital and is currently in critical condition.