A SWAT team on Saturday arrested a man suspected of shooting and wounding a Texas state trooper after fleeing from an attempted traffic stop and then holing up in a suburban Dallas apartment for a 15-hour standoff, authorities said.

Bryan M. Cahill, of Frisco, was taken into custody shortly after 5 a.m. and was taken to a hospital for treatment of serious injuries, Lonny Haschel, a Texas Department of Public Safety spokesman, said in an email.

Once he's able, Cahill, 42, will be jailed on a charge of aggravated assault on a police officer, he said.

Authorities say Cahill shot the trooper after fleeing to the Frisco apartment complex from an attempted traffic stop on a highway Friday afternoon. Haschel said Cahill fired shots at officers multiple times during the standoff, but that no one else was injured.

Cahill lives in the apartment complex, another resident, Scott Bowers, told the Fort Worth Star-Telegram. Bowers said he rarely spoke with Cahill and that he saw police shoot Cahill.

Authorities have not released details about Cahill's injuries.

Video obtained by the Dallas Morning News shows a trooper exchanging gunfire in the complex's parking lot.

In in the video, the sound of gunfire rings out and the trooper can be seen falling, scrambling to recover and then hopping on one leg behind a Department of Public Safety vehicle. Moments later, the trooper rounds the vehicle and then falls backward, his hat flying off, before again climbing to his feet behind the SUV.

The wounded trooper underwent surgery and doctors said it "went well," Haschel said. The trooper was in "good spirits" at the hospital Saturday morning but faces a long recovery, he said.

The apartment complex was still an active crime scene as of 7 a.m., he said.

___

An earlier version of this story was corrected to reflect that the trooper was shot after reaching the apartment complex, not during the attempted traffic stop.