A Havertown teen who shot a high school classmate during a botched drug deal last year has pleaded guilty to gun charges, according to court records.

James McCauley, 18, pleaded guilty March 2 to reckless endangerment, possession of a gun without a license, and receiving stolen property. Court officials said Thursday that his sentencing has been tentatively set for May 4.

The more serious charges McCauley faced, including attempted murder, were dropped, court records show.

McCauley was arrested in February 2019 after shooting Marquis Mays, 19, in the face, causing what prosecutors said were “catastrophic injuries.” The two, then both students at Haverford High School, had met during an arranged drug deal, during which McCauley was going to sell an ounce of marijuana to Mays, according to the affidavit of probable cause for McCauley’s arrest.

During the transaction, which took place inside a car McCauley had borrowed from his mother, Mays and another teen attacked one of McCauley’s friends who was sitting next to them inside the vehicle, prosecutors said. As the fight continued, McCauley fired a .40-caliber handgun he was carrying, striking Mays once in the right side of his face.

McCauley’s attorney, A. Charles Peruto Jr., said Thursday that the shooting was in self-defense as Mays was choking McCauley from behind. Peruto said Mays lured McCauley to the scene to rob him on the pretense of a drug deal.

“I don’t think he should face jail time,” Peruto said. “He was being robbed, regardless of what he was doing."

The gun used in the shooting had been reported stolen months earlier, according to detectives who testified at McCauley’s preliminary hearing last year.