Police Officer Andrew James McGill Jr. was part of a drug network that trafficked in heroin, cocaine and marijuana for more than a decade, his involvement beginning when he was at the police academy and evolving over a 10-year career that included a stint as a narcotics investigator, according to court records and law enforcement officials.

Much of the dealing occurred in the unit block of Forrester Street in Southwest Washington, a notorious marijuana market in the mid-1990s that was eventually tamed after D.C. police made a concerted effort to roust dealers and buyers. Throughout most of the 1990s, the area on and around Forrester Street was the scene of dozens of drug-related shootings, many of them fatal.

Because of the sensitive nature of the investigation, which is continuing, many of the records in the case are sealed in U.S. District Court in Greenbelt. However, documents in two unsealed files, each of which is about two inches thick, provide an outline of how the alleged ringleader, Erskine "Pee Wee" Hartwell, and eight associates, McGill among them, worked a lucrative drug market.

The documents do not detail the alleged role of McGill, 29, who joined the police force in July 1990. McGill was arrested Thursday on federal charges of trafficking cocaine beginning in 1989. The investigation, which involves the Drug Enforcement Administration, the FBI, the Maryland U.S. attorney's office and D.C. police, was initiated by D.C. police, the source said.

McGill was transferred from the 7th District to the 5th District in 1997 for reasons that were not disciplinary, said Cmdr. Winston Robinson of the 7th District.

Police Chief Charles H. Ramsey said he would not go into details about McGill's nine years at the department or why he was transferred, noting that the investigation is ongoing. Nor would Ramsey specify when the Office of Professional Responsibility began investigating McGill and his work in the 7th District, where some of the alleged activity occurred.

"These are very serious charges against him. We are taking them very seriously," Ramsey said. "We have to root out corruption in the department."

What is clear is that McGill had been targeted only recently by authorities for trafficking drugs, possibly while serving as a plainclothes narcotics officer in the 7th Police District.

Among the unanswered questions: How could an alleged drug dealer infiltrate the police department? And how could he have stayed undetected for so long without other drug dealers or fellow officers noticing?

The arrest also complicates any cases that McGill investigated.

When an officer is arrested, there's the chance that every conviction he was part of could be challenged. A.J. Kramer, head of the Federal Public Defenders Service, has begun pulling cases McGill was involved with to see if any of those convictions could be overturned, he said.

And it goes beyond cases that McGill investigated, D.C. defense lawyer Bernard Grimm said.

"It would compromise every case in which he was a witness," Grimm said. If McGill were convicted, prosecutors would be caught in a ripple effect that would require them to search their databases for every case bearing his name, from traffic tickets to major felony arrests, he said. "It's a nightmare for them."

During a brief hearing in U.S. District Court yesterday before U.S. Magistrate Judge Charles B. Day, McGill said he "absolutely" understood the charges he is facing, which carry a maximum penalty of 40 years in prison and fines of up to $4 million upon conviction.

Assistant U.S. Attorney Sandra Wilkinson asked that McGill, who was arrested by federal agents and D.C. police as he arrived Thursday afternoon for his shift at the 5th District in Northeast Washington, remain in custody pending a March 14 trial.

Day scheduled a detention hearing for Monday for McGill, who was charged with conspiracy to distribute dangerous substances and is being held in Maryland by the U.S. Marshals Service, according to the DEA, which is the lead agency in the investigation.

McGill, dressed in a long-sleeve black T-shirt and his dark blue police trousers, appeared to struggle to maintain his composure as the hearing ended, and a relative sitting behind him in the courtroom began to weep.

"He's innocent," Andrew James McGill Sr., the officer's father, said in a brief television interview.

The nature of McGill's alleged involvement in the drug ring is not detailed in the court records, which outline the roles that other members of the alleged conspiracy played.

On Dec. 21, Levi Lawrence Hill pleaded guilty to one count of conspiring to distribute controlled substances in exchange for his cooperation with federal prosecutors.

According to a statement that is part of the plea bargain, Hill admitted that, as part of the drug conspiracy, he purchased 10 kilograms of powder cocaine before his July 1996 arrest. In August 1995, Hill said, he was speeding on his motorcycle, trying to evade Prince George's County police, when he threw a backpack stuffed with $12,480 in small bills onto the garage of a drug-dealing associate, according to court records.

On Oct. 27, William Herrion pleaded guilty to one count of interstate travel to promote narcotics distribution and possession of a falsely made security in exchange for his cooperation, according to court records.

Herrion said he sold crack cocaine from the unit block of Forrester Street SW, where the alleged ringleader Hartwell owned a home, according to court records.

Herrion also leased a number of cellular phones and had a phony pager business, which he used to help the drug organization, according to Herrion's statements detailed in court records.

Another of the alleged conspirators, Bassem Najjar, the former owner of a used-car lot who was convicted in U.S. District Court in Greenbelt last month of running a chop shop, allegedly sold large numbers of cars to drug dealers and relatives of drug dealers.

Najjar allegedly structured some of his deals to avoid having to file reports with the Internal Revenue Service for transactions involving more than $10,000 in cash payments, according to court records.

Staff writer Petula Dvorak contributed to this report.