State Trooper Patrick Casey was bearing down on the car in front of him on the Vine Street Expressway, a car he had been called in to pursue after it sped off from a routine traffic stop minutes earlier.

At the wheel was a 17-year-old boy with a loaded gun.

Casey pulled alongside him. In the chaotic minutes that followed, police say, the teenager opened fire on the trooper. His car hit Casey's cruiser, crashed headlong into the back of a school bus, and caused an enormous fire on one of the city's busiest thoroughfares.

Then, police say, the boy leaped from his car and engaged in a fierce gunfight with Casey, wounding the trooper in the left shoulder before he was captured.

Casey, 31, was in stable condition at Hahnemann University Hospital on Tuesday evening. The bus driver, who was the only person on the bus, scrambled from the crash unharmed. The teenager, identified Wednesday as Giovanni Cotto, was charged as an adult Tuesday night with attempted murder, aggravated assault, assaulting a law enforcement officer, and related offenses.

Speaking outside the hospital, State Police Capt. James P. Raykovitz gave this account:

About 8:55 a.m., a pair of troopers stopped a car with an expired registration tag on I-76 near the University Avenue exit. The occupants - four males - filed out at the troopers' request. The troopers handcuffed one "until positive identification was made," Raykovitz said, and put him in the back of a squad car.

Then, Raykovitz said, the 17-year-old jumped back into the car and sped off. The troopers pursued him, leaving behind the other two males, who ran off, Raykovitz said.

Casey, who has spent his six-year career in the state police at Philadelphia's Belmont barracks, was called in to help the troopers who had made the stop. He chased the fleeing car into the eastbound lanes of the Vine Street Expressway.

Raykovitz said Casey tried to pull around the teenager's car in an attempt to box it in.

But the teenager opened fire on Casey as he drew alongside, he said, in the eastbound lanes near 21st Street.

The teen crashed his car into Casey's and then lost control. It slammed into the back of a school bus, wedging itself underneath the back and sparking a fire.

Police said the teen jumped out of the car and began to fire at Casey again. Casey, still in his car, fired back, as did two other troopers. This was when he was hit in the shoulder.

From the highway and the buildings surrounding the expressway, bystanders heard the crash - then, rapid fire.

Brett Pastorius, a contractor working on the fifth floor at Park Towne Place on 22d Street, saw police in the eastbound lanes with their guns drawn on a male who appeared to be surrendering. Then, Pastorius said, the male jumped the median and ran toward the 21st Street overpass until he was out of their sight.

Although the car had been crushed underneath the flaming bus, the motor was still accelerating, contractor Ron Meyers said. The tires spun until they disintegrated in the fire.

Police said the 17-year-old was taken into custody after a brief foot pursuit by three troopers and two Philadelphia plainclothes officers. Another occupant of the car - the man who had been handcuffed during the initial traffic stop - was in custody before being released Tuesday night.

Police were searching for the two others Tuesday and had identified one. Raykovitz said it was not yet known whether anyone else would be charged.

Both lanes of I-676 were shut down for hours Tuesday morning, and were not reopened until the afternoon. A crime-scene unit, dispatched to the highway, marked and collected shell casings. At least eight bullets were visible in the windshield of the trooper's cruiser. The driver's-side window appeared to have been shot out.

The charred school bus sat on the highway as firefighters worked to extinguish hot spots more than an hour after the fire.

Philadelphia School District officials said that before the crash, the bus had dropped students off at St. Katherine Day School, a special-education school in Wynnewood run by the Archdiocese of Philadelphia.

Outside Troop K's headquarters on Belmont Avenue, Hector Cotto peered through a wrought-iron fence and waited for news of his 17-year-old son, Giovanni, who he said was one of the two suspects in custody at the barracks.

Cotto said a detective called him after the arrest of his son, who lives in North Philadelphia. He said he had heard no news since, and did not know the extent of his son's involvement.

"He's a good kid," Cotto said, "but if they did something wrong, they have to pay for it."

At Hahnemann, Casey was surrounded by his family and fellow troopers, and was talking and in good spirits, officials said. Mayor Nutter said the injured trooper had asked him, with a smile, how he was when he walked into his hospital room.

Casey was expected to be home from the hospital, officials said, in time for Thanksgiving dinner.

215-854-2961

@aubreyjwhelan

Inquirer staff writers Matt Gelb and Kristen A. Graham contributed to this article.