An Allentown teenager who turns 18 next month has been arrested in connection with a fatal shooting in the city earlier this week, officials said.

Yaniel Fermin, 17, is charged with criminal homicide, possession with intent to deliver and possession of a firearm by a minor, District Attorney Gavin P. Holihan and Allentown Police Chief Charles Roca jointly announced Saturday.

Fermin is being held in Lehigh County Jail without bail, officials said. His preliminary hearing is scheduled for 1:15 p.m. on Jan. 30 in Lehigh County Central Court.

Although Fermin is a minor, he was arrested as an adult on all charges as permitted by Pennsylvania law at the discretion of the District Attorney, officials said.

Allentown police officers were called to the 500 block of West Washington Street at 9:16 p.m. on Thursday for a report of a man who had been shot in the back of a residence, according to officials.

Officers found the victim, Jeomy Miguel Soto, suffering from gunshot wounds.

Soto, 19, died at Lehigh Valley Hospital in Muhlenberg. His death was ruled a homicide, officials said.

Police interviewed an unidentified witness who said he was with Soto at the time of the shooting and met with a man he only knew as “Po” to collect money owed to him for the sale of THC vapes, according to officials.

“Po” was later identified by police as Yaniel Fermin. Fermin disagreed about the owed money and a fight ensued between Fermin and the witness, police said.

Fermin was in possession of a 9mm semiautomatic handgun and fired at least two shots which struck Soto, who was standing nearby, police said. He taken into custody less than 24 hours after the shooting, according to officials.

Under Pennsylvania law, possession of such a firearm by a minor is illegal.

On Friday, Fermin was a passenger in a car stopped by police near 6th and West Cedar Streets. Police found THC vapes, a large amount of marijuana and other drug paraphernalia, according to officials.

The charges of criminal homicide and possession of a firearm are related to the shooting of Soto, while the charge of possession with intent to deliver is related to the vehicle stop, police said.