Federal authorities announced Monday that they averted a murder-for-hire plot and possibly prevented another killing by stopping the man they say was behind both as he prepared to meet a hit man he believed he’d hired — not with the payment he’d promised but with a loaded gun.

Prosecutors said Darnell Jackson, a 47-year-old whom they described as a Southwest Philadelphia narcotics dealer, agreed to pay $5,500 for the slaying of a drug world rival. But Jackson was unaware at the time that the man he hired to carry out the job was informing on him to the FBI from the start.

Working with agents, the informant strung Jackson along, agreeing to carry out the murder and recording several conversations in which they discussed the details of the plot. Jackson, according to court filings, suggested he would not object if others were harmed during the attempt on his rival’s life.

When the informant called Wednesday evening to falsely report that the hit had been carried out and to set up a time to receive the agreed upon sum, Jackson headed to meet him without the money and with the loaded gun.

“It is no stretch of the imagination to conclude that law enforcement thwarted multiple alleged attempted murders by [Jackson] last week,” said acting U.S. Attorney Jennifer Arbittier Williams at a news conference Monday announcing Jackson’s arrest.

She did not identify the informant or the intended victim.

Jackson’s lawyer, Nino V. Tinari, flatly denied the allegations against his client and accused the informant of selling the FBI an outsized story. Asked about the recordings made by the informant, quoted in court filings, that appear to show Jackson ordering the hit, Tinari said he’d not yet had a chance to review them.

He described Jackson as an activist who had worked to turn his life around after past run-ins with the law and who now served as a mentor to community groups seeking to keep young people out of trouble.

“They took a high profile guy and are attempting to tear him down,” Tinari said. He would not identify any of the specific community groups he said Jackson had worked with.

The case, which was investigated by the FBI and the Philadelphia Police Department, arose from the “All Hands on Deck” initiative Williams announced in April between federal and local law enforcement agencies aimed at combating the record pace of fatal shootings the city has seen this year.

The city has logged more than 315 homicides so far this year, on track to outpace last year’s near-record number of 499.

But Jackson’s case highlights one hurdle federal law enforcement has encountered in their efforts to stem the tide of violence.

Jackson was on state probation for felony convictions of voluntary manslaughter and aggravated assault at the time of his arrest and, therefore, was legally barred from possessing a gun.

But because the weapon he was allegedly carrying was an untraceable personally manufactured firearm — also known as a “ghost gun” — with no registration and no serial number, federal prosecutors could not charge him with illegal gun possession because they could not prove it had crossed state lines, a requirement of the federal statute.

Philadelphia police have recovered more than 300 ghost guns involved in shooting incidents in the city this year, officials said.

In Jackson’s case because the gun was loaded, prosecutors were able to charge him with illegally possessing ammunition as a felon — a crime punishable by up to 10 years in prison.

Combined with an additional murder-for-hire charge, he faces a total maximum sentence of 20 years should he be convicted.

As of Monday evening, Jackson remained in custody pending a detention hearing next week in which prosecutors said they will seek to keep him in jail until his trial.