Photographs from FBI files of the Chevrolet Impala, which had been assigned to FBI agent Matthew Lowry, in which heroin and other evidence were found. Some areas were redacted by court officials to prevent disclosure of sensitive information. (U.S. District Court)

An FBI agent in the District fired for stealing heroin, collected as evidence, for his personal use was charged Friday with 64 criminal offenses and, through his attorney, said he would plead guilty and focus on avoiding a drug relapse.

The 33-year-old former agent, Matthew Lowry, had been part of a team targeting violent drug traffickers who cross between Maryland and the District. His misconduct compromised cases and forced the dismissal of charges against 28 defendants. It also exposed weaknesses in the handling of drug evidence in the FBI’s Washington field office.

Lowry faces up to seven years in federal prison, according to the U.S. attorney’s office in Philadelphia, which is handling the case. He was charged in a criminal information, which can only be filed with a defendant’s consent and typically indicates that a plea deal has been reached. A court date has not been set, and his attorney declined to say whether prosecutors have agreed to a sentence.

The case represents a stunning turn for the Maryland resident, who graduated near the top of his class at the University of Maryland, earned a graduate degree while working full time for the FBI and tried to follow his father’s distinguished career in law enforcement. He was found six months ago, seemingly incoherent, on a lot near Southeast Washington’s Navy Yard with open bags of heroin in his agency car.

His attorney, Robert C. Bonsib, said Lowry became addicted to powerful pain medication wrongly prescribed to treat potentially debilitating ulcerative colitis, and he turned to heroin to self-medicate when his doctor disappeared and he ran out of medicine to control his pain.

A look at how Agent Lowry affected the case of Earl Owens, who was eventually dismissed.

“Matt Lowry is devastated by the consequences of his conduct, particularly as it has affected the drug investigations that he, his fellow law enforcement officers, and prosecutors had spent so much time developing and pursuing,” Bonsib said in a statement. He added that it “is contrary to everything he trained himself for and believes in.”

Bonsib said that Lowry plans to plead guilty to all 64 criminal counts and that his client spent hours with prosecutors retracing his steps through every case he worked or stole from in order to help authorities understand the impact on prosecutions.

“Mr. Lowry fully disclosed to investigators the items of evidence with which he tampered,” Bonsib said. The former agent spent three months in outpatient drug treatment.

Lowry was charged in U.S. District Court in the District, although local prosecutors recused themselves because of a conflict and dealt only with the impact the thefts had on other criminal cases. The U.S. attorney’s office for the Eastern District of Pennsylvania took the lead in investigating Lowry. His faces 20 counts of obstruction of justice, 18 counts of falsification of records, 13 counts of conversion of property and 13 counts of possession of heroin.

The case broke open at the end of September, when Lowry left work after a difficult day and an argument with his wife and never made it home. His father called friends at the FBI, who scoured the District and eventually reached Lowry by phone. He had run out of gas in his FBI-assigned Chevrolet Impala on a lot near the Navy Yard. The agents described him as incoherent.

Friends had noticed Lowry’s erratic behavior, but knew that he had a new baby at home and was having trouble in his marriage. They took Lowry to a fellow agent’s apartment that night.

But the next day, agents were cleaning out the trash in the car when they found the drugs. Inside were evidence bags, full of heroin, that had been cut open. The case became public a month later as prosecutors began notifying defense attorneys about possible misconduct.

Photographs from FBI evidence files of heroin found in the car assigned to FBI agent Matthew Lowry. Prosecutors dropped drug cases against 28 defendants in four cases based on evidence now deemed tainted. (U.S. District Court)

The Washington Post obtained more than 600 pages of internal documents, memos and transcripts of interviews with Lowry’s fellow agents that detail how he managed to obtain the drugs and the personal events leading to his downfall.

In those documents, Lowry described how he took advantage of procedures that allowed a single agent to sign out drugs for lab analysis and did not track whether the packages reached their purported destination. As a result, Lowry was able to store drug evidence in his car, sometimes for as long as a year, with no questions asked. Lowry described how he forged signatures of agents on forms and evidence seals, repackaged drugs in bags and used store-bought laxatives to replaced heroin he had taken to avoid discrepancies in package weight.

Lowry, who started working at the FBI as a civilian in 2003 and became an agent in 2009, earning a leadership award from the academy, had been assigned to what is called the Cross Border Task Force. He mostly took drugs from cases he worked.

Many of the 28 defendants whose cases were dismissed had already pleaded guilty and had been sent to prison, some for up to 10 years or more. Within two months, all of them had been freed and sent home with the convictions erased. Those charges had been filed based solely or substantially on drug evidence that Lowry stole from.

Bonsib said Lowry at first had received sound treatment for his colitis, but his doctor left private practice. A new doctor changed course and prescribed pain medication, which Bonsib said alleviated the symptoms but did not address the underlying illness. Bonsib said Lowry “was not properly advised of the highly addictive characteristics of the pain medications he was receiving.” Bonsib added, “Mr. Lowry subsequently became dependent on them.”

He said that doctor then left, leaving Lowry without medical care. He said Lowry tried to “go cold turkey,” but his “addiction was overpowering and the pain from the ulcerative colitis was unbearable. This is how Mr. Lowry turned to self-medication by the use of the drugs in this case.”

The documents obtained by The Post show how Lowry first used heroin taken from a drug case dubbed “Midnight Hustle.

Bonsib said Lowry spent three months in outpatient drug rehabilitation and is being treated by a specialist. “Mr. Lowry recognizes the need to continue to attend counseling and drug treatment in order to avoid a relapse.

“Matt Lowry now faces the next step in his life and he knows that this phase will be tough and a struggle,” Bonsib added.