When his 16-year-old friend overdosed on heroin, Kyle Alifom was already on probation and feared more punishment. He carried her into the basement of his Northern Virginia house, found her dead the next morning and hid her body in a neighbor’s yard. He was given a harsh sentence for his crime: over 61/2 years in federal prison.

But last month, Alifom was set free after only three years behind bars. The 23-year-old apparently was offered a large sentence reduction in exchange for testifying against the man authorities see as the true villain: the heroin dealer.

The father of Emylee Lonczak, a rising junior at McLean High School, said the family was “crushed by the news and frustrated that we didn’t learn about” Alifom’s release from authorities.

Don Lonczak said he understood that “in terms of risk to children out there, I think getting a serious dealer off the streets ultimately is more important.” Still, the family doesn’t think a young man who they believe could have saved Emylee’s life should be out of prison so soon.

“You can’t have a light sentence for something like this, because it basically sends a signal that however morally repulsive what he did might be in hindsight, it looks like a pretty sound legal strategy,” Lonczak said. “He was going to get in trouble with the law if he helped my daughter, and by not helping her there was the possibility that she might not have died. So he took the risk.”

On Aug. 21, 2013, Alifom, ­Emylee and two others went on a excursion from Fairfax, Va., to buy heroin in the District. There, they met up with dealer Antowan Thorne, who went by the nickname “Smooth.” Thorne had never met Emylee, although he had previously sold heroin to some of Alifom’s other friends.

But law enforcement in Virginia and across the country are now targeting dealers whose drugs lead to deadly overdoses for the harshest prosecution. For selling the heroin that went into Emylee’s veins, Thorne was sent to prison for 25 years. Alifom, who had pleaded guilty to tampering with evidence, testified at Thorne’s trial.

“Our goal in every narcotics investigation is to dismantle the threat to our communities at the highest level possible,” Dana J. Boente, U.S. Attorney for the Eastern District of Virginia, said in a statement. “This approach has resulted in the prosecution of large-scale drug traffickers who pose a significant threat on a national and international level.”

Boente would not confirm that Alifom’s sentencing reduction was in exchange for his testimony. By law, the subject is under seal. But Gene Rossi, a former prosecutor in the Eastern District who is now running for lieutenant governor, said such deals are the “bread and butter” of prosecuting major drug dealers.

“I don’t think it’s unfair or unwise to let that person go,” Rossi said. “He didn’t intend for her to die; he was an immature young man who did something very rash and very stupid.” Dealers such as Thorne, on the other hand, “are the ones who are causing the poison to be on the street.”

James Berthay, who dealt drugs with Thorne, testified during Thorne’s trial that their product was “extremely, extremely potent” heroin that quickly developed a following among ­20-somethings in Fairfax County. Berthay, who became addicted while dealing, would warn buyers to take small doses and keep overdose medication on hand.

Emylee had never done heroin before the night of her death. Zachary Power, part of the group that went to the District that night, had to help her inject the drug. He testified at Thorne’s trial that afterward everyone was nodding off in the car, waking up only to compliment the quality of the drugs.

“I have a very clear memory of Emylee saying, ‘Oh, my God. Oh, my God. This is real heroin. This is good heroin,’ ” Neema Zadeh, another member of the group, testified in court.

While the three others in the group went in and out of consciousness, Emylee passed out completely. Alifom testified at Thorne’s trial that he brought her into his basement guest room, tucked her into bed and left a glass of water by her side.

“I didn’t think that she was deathly ill. There was no way of telling that she was deathly ill,” he said in court. “Emylee just appeared to be asleep.”

When he came back in the morning, her body lay in the exact same position as it had the night before. The water was untouched. He realized she was not asleep.

“She had foam, foam around her mouth, and she [had] urinated herself,” Alifom testified. “I panicked.”

Power and Zadeh recalled that there had been discussion of calling an ambulance for Emylee the night before.

“I remember [Alifom] insisting, ‘She’s going to be okay. Don’t worry about it. I’ll take care of it. If anything happens, I’ll call the ambulance. It’s not a problem,’ ” Zadeh testified.

Alifom testified that the heroin had made him nauseous, and he doesn’t remember that conversation or much else. But Alifom acknowledged that he had been worried about getting caught violating his probation. He had prior convictions for charges including trespassing and marijuana possession.

Since Emylee’s death, Virginia has implemented a “Good Samaritan” law that protects drug users who call 911 to report overdoses. But the law is not as sweeping as in other states; it provides a defense that can be used in court, not immunity from prosecution.

Advocates for reform say that law does not go far enough.

“I don’t think people understand an affirmative defense; they ask, ‘Am I going to be arrested?’ ” said Brandon Garrett, a professor at the University of Virginia Law School. “These overly harsh drug possession laws cause people not to care for friends or even loved ones who are facing overdoses.”

In letters to the court after Alifom’s conviction, friends and relatives described him as good-hearted but weak-willed. He was obsessed with attention and popularity, several said, and struggled with drug use and untreated attention deficit disorder.

“He grew up to be a privileged but somewhat naive, spoiled and irresponsible child of the Facebook era,” his uncle Mikael Wossen wrote. “Being a follower and a pleaser of sorts, was a dangerous combination in this otherwise fun loving and highly sociable character.”

Alifom declined to comment. His mother, Elizabeth Wossen, said the family does not want to discuss the past.

“Her parents are suffering, we are suffering,” she said. “We’ve all suffered enough.”