HACKENSACK, N.J. (AP) _ A witness to the shooting death of a black teen-ager by a white police officer was arrested in the courthouse Friday after testifying in the officer's trial.

Prosecutors complained that the arrest of 36-year-old Melvin Deberry in front of television cameras at the Bergen County Courthouse was an attempt to intimidate witnesses in the trial of Gary Spath. The sheriff's office that arrested Deberry denied any impropriety.

Spath, a police officer in Teaneck, N.J., is charged with reckless manslaughter in the April 1990 shooting death of Phillip Pannell, 16. Prosecutors say Pannell had his hands in the air to surrender when he was shot. Spath maintains the youth was reaching in his pocket for a gun.

Teaneck, an affluent New York City suburb, was the site of a rampage the night after Pannell's shooting. Youths at a candlelight protest overturned cars, smashed windows and looted stores.

Deberry was on probation for a disorderly persons charge and was arrested for failing to meet his probation officer, an official said. A law enforcement official called the sheriff's office after seeing him testify on television, said Jay Alpert, assistant Bergen County Sheriff.

The state attorney general's office said the arrest compounded the problems the prosecution has with Sheriff Jack Terhune, whose officers provide courthouse security. Terhune was a lieutenant in the Teaneck Police Department at the time of the shooting, and is expected to testify in the trial.

''It is highly unusual that the prosecutor was not notified that one of his witnesses was going to be arrested,'' said Robert Winter, director of the Division of Criminal Justice in Attorney General Robert Del Tufo's office.

Superior Court Judge Charles DiGisi warned Alpert to avoid such incidents in the future.

Prosecutors had cited Terhune's relationship with Spath and his partner, Officer Wayne Blanco, in requesting that the trial be moved from Bergen County. The request was denied.

''Soon after the shooting, Terhune examined the clothing of the deceased, and met with Officers Spath and Blanco alone before they gave statements to police,'' Winter said. ''He was there while they gave statements, offering comment, and has been involved with them since then.''

Officers could have escorted Deberry into their office instead of slapping on handcuffs as television cameras recorded the arrest, Winter said, or could have arrested him on one of his several pre-trial visits to the prosecutors office.

Alpert, the assistant sheriff, replied: ''I don't believe anything was done out of the ordinary ... The fact that the arrest was made out of the area of the courtroom, to insure that no participants of the trial would be aware of it, was done purposely.''

Under questioning by prosecutor Glenn Goldberg, Deberry said he witnessed the shooting as he walked home from a liquor store after work.

Deberry held his hands over his head, as if in surrender, to show the jury how he said Pannell was holding his arms when Spath fired at him.

Defense attorney Robert Galantucci questioned Deberry about a number of inconsistencies in his testimony and said he had told a state grand jury that Pannell had his arms at chest level.