When the narcotics officer walked into courtroom 1005 on Monday, he was shocked to see the court officer was someone who'd just been arrested in a drug raid.

Fresh out of jail, court crier Ronald McCray was sitting at the foot of Common Pleas Judge Earl W. Trent Jr., ready to work.

During a two-hour narcotics operation on Saturday night, McCray, 29, of 26th Street near Oxford, was one of a dozen alleged drug dealers and buyers arrested by the officer and other members of the Narcotics Strike Force inside a North Philadelphia housing project on Glenwood Avenue near 25th Street.

Police said they confiscated five handguns, $3,650 worth of crack cocaine, cocaine and marijuana, and nearly $5,000 in cash, in the raid headed by Officer Scott Schweizer.

McCray quickly "identified himself to one of the officers [saying] that he worked for Judge Trent," said Narcotics Capt. James Kelly. "It was quite a surprise."

Police began surveilling drug activity in the housing project about 8:30 p.m. and moved in at 9:25 p.m.

At the time, Officer Charles Kapusniak was securing the rear of a Glenwood Avenue residence when he saw McCray trying to escape through a second-story window, according to a police report obtained by the Daily News.

Kapusniak ordered McCray back through the window and saw him clutching a black .38-caliber Colt revolver in his right hand. An officer inside the house arrested McCray.

Police later found five rounds in McCray's gun, two Ziploc bags of marijuana and $44 in his pockets, the report stated.

On Monday, a narcotics officer who was to testify in an unrelated case involving a crack dealer before Judge Trent, shared McCray's secret with Assistant District Attorney Kandice Horsey.

"We just arrested this guy, the court crier" the cop told Horsey, according to a court observer. "I don't think it is appropriate that I have to testify in front of him."

Horsey asked Trent "to recuse himself" from the drug case since the narcotics officer felt uncomfortable before the judge and McCray, sources said.

The judge declined.

"No, I can be fair," replied Trent, witnesses said.

Horsey notified her supervisors in the district attorney's felony waiver unit.

Minutes later, McCray was escorted from the courtroom. Another court crier took his seat by the judge's side.

Apparently, the D.A.'s office has had problems with drug cases before Trent.

In 2005 and 2006, the D.A.'s office requested more jury trials in drug cases before Trent than before any other judge in the criminal courts, said a criminal-justice source.

According to sources familiar with the drug cases, Trent typically convicts a dealer only on the amount sold to the buyer - not for any larger, hidden drug stash that officers discover.

If convicted of possession with intent to deliver, a drug dealer faces a three-year mandatory minimum for two grams of crack-cocaine or cocaine. If convicted of drugs and gun charges, the mandatory minimum is five years.

Yesterday, Trent declined to comment on McCray, or his handling of drug cases.

He referred questions to the First Judicial District, which oversees Common Pleas Court staff.

Dave Wasson, deputy court administrator, said McCray was placed on "involuntary leave without pay."

Wasson said McCray was hired as a court officer last December and was to help manage the courtroom.

If arrested, court employees are required to notify their supervisor immediately, Wasson added.

McCray was arraigned on three weapons offenses, three drug charges and conspiracy. Early Sunday, he was released on a $15,000 bail bond, after posting 10 percent cash, and returned to his job as if nothing had happened.

On Monday, an internal court investigation was opened to determine if, and when, McCray told his supervisor about his arrest, said Wasson. After the investigation is complete, the court will decide whether McCray should keep his job.

Court policy prohibits employment of any person convicted of a felony, anyone convicted of a misdemeanor during the previous seven years and anyone who has "an open criminal file," said Wasson.

In another arrest on May 23, 2001, McCray was charged with weapons violations, terroristic threats, simple assault and reckless endangerment during an April 29, 2001, incident inside a suite on Lindbergh Boulevard near 79th Street, according to a police report.

The victim, Kenneth Gibson, 19, of Hampton, Va., relocated to Detroit and told police he had no desire to pursue the matter. McCray's arrest was later expunged, according to a court official. *