The dramatic video of a teenager fleeing Pennsylvania state troopers on two busy Philadelphia highways in November 2015 — and an ensuing firefight in which one trooper was shot and injured — was played for the first time Tuesday in a public courtroom.

Giovanny Cotto, then 17, driving a white Toyota Camry after fleeing a traffic stop, pulled out a .45-caliber pistol and fired into Trooper Patrick Casey's vehicle on the Vine Street Expressway during morning traffic.

"He's got a gun! He's got a gun!" yelled a trooper in another vehicle, according to its dash-cam video played at Cotto's sentencing hearing. After the Camry, which had rammed into a school bus, came to a stop near the 21st Street bridge, Cotto continued firing as he got out and aimed toward Casey's car, which became disabled after Cotto's had sideswiped it.

"It is a miracle that you are here today," Common Pleas Court Judge Roxanne Covington told Casey before she sentenced Cotto to 35 to 70 years in state prison — a term negotiated by the prosecution and defense.

In a courtroom packed with nearly 40 state troopers, Covington thanked them for their bravery.

This shooting is "a reminder of how dangerous your job is," she said. "That when you pull someone over, you don't know what you're going to encounter. … I thank God that you are all still here."

Cotto, now 19, of North Philadelphia, pleaded guilty June 7 to three counts of attempted murder involving Casey and Troopers Timothy Jeter and William Evans, and related offenses.

It was about 8:55 a.m. Nov. 24, 2015, when Cotto was stopped by Jeter and Evans on the Schuylkill Expressway on-ramp near University Avenue for an expired registration. While waiting for a tow truck, Cotto jumped back into the Camry and fled into rush-hour I-76 traffic about 9:30 a.m.

"Go! Go! Go!" one trooper yelled in pursuit. Casey, driving another vehicle, arrived as backup. After Cotto drove onto I-676, he rammed into the side of Casey's vehicle, then the bus. From his car, Cotto began firing at Casey.

Trooper Patrick Casey
File Photo
Trooper Patrick Casey

Casey, 33, told the judge he saw Cotto aim the gun at him, felt a burning sensation, and fired back.

After the vehicles stopped, Cotto got out and jumped over the median, but was caught. The Camry and bus — unoccupied after the driver got out — burst into flames.

Casey, rushed to Hahnemann University Hospital by Evans, said he wondered, "What would my parents think?" He has returned to work, but still feels pain.

His mother, Mary, who wept during the playing of the video, told the judge: "I prayed, 'Please God, let him be OK.'"

It is a miracle that no one else was hurt and that Cotto himself was not injured, Assistant District Attorney Erin Boyle said. She said after the hearing that it's not clear where Cotto got the gun, which had been reported stolen in Georgia.

Cotto briefly apologized, saying: "I deeply regret this."