MARICOPA COUNTY, Ariz. - Deputies with the Maricopa County Sheriff's Office confirmed that a man has been detained in connection with multiple shootings and a carjacking on Beeline Highway (SR-87).

A large crime scene, spreading an estimated 18 miles along SR 87, remained active early Wednesday after police in the East Valley responded to an active-shooter situation near Shea Boulevard Tuesday night.

Authorities searched for the gunman who shot at and hit a DPS cruiser and two other vehicles, injuring two people.

The suspect in custody is James David Walker, 36, of San Tan Valley. Walker served more than a decade in state prison for murder.

He was charged with first-degree murder in 1996. He shot two people on Halloween 1995 after a fight started over comments about a costume when he was 16 years old, authorities said. He killed one person and the other survived.

A jury found him not guilty of first-degree murder, but guilty of second-degree murder. He spent 16 years in prison for second-degree murder and aggravated assault.

He was released from prison in Jan. 2014.

Walker was also arrested March 13 this year on suspicion of doing drugs in a parking lot. When Mesa police dried to arrest him, he allegedly rammed the police vehicles. He is still awaiting trial for that charge.

Investigators believe Walker starting firing an AR-15 rifle into traffic about 8:30 p.m. Tuesday.

Two vehicles were hit. One caught fire. One person's head was grazed by a bullet; he's expected to be OK and did not require hospitalization. The other drove himself to Fort McDowell with a non-life-threatening gunshot wound. He's in the hospital.

WATCH: One detained after shooting on Beeline Highway

Investigators say Walker carjacked a vehicle after the first shootings and drove from the scene, heading north on SR 87. He drove into a ditch and again opened fire, hitting a Department of Public Safety trooper's cruiser. The trooper was not hurt.

The suspect then ran away and refused orders to surrender or show his hands, investigators said. They were able to catch Walker with the help of a police dog, which bit him.

He's being treated for minor injuries.

Aerial video from Sky 12 showed a large law enforcement response to the situation. Several agencies are involved in the ongoing investigation.

VIDEO: Beeline shooting scene develops

Walkerfaces multiple charges related to aggravated assault and carjacking. MCSO, DPS, and police from the Salt River Indian Community, Fort McDowell Yavapai Nation and Mesa are working together on the incident, with DPS taking the lead.

SR 87 was closed from Gilbert to SR 188 northbound, and southbound from SR 188 to Shea until the late morning.

REAL-TIME TRAFFIC: 12ne.ws/traffic

Police also say they found body armor near the scene of the first shooting.