Former police informant Gregory Gibson today abruptly announced his refusal to testify further in the seven-week-old Prince George's County police "death squad" trial here but then agreed to continue after a federal Public Defender attorney was rushed in to consult with him.

The federal civil trial, in which three county policemen are accused of staging a series of robberies in 1967 in which two men were slain and two others arrested, teetered on the brink of mistrial as attorneys scrambled to persuade Gibson to remain in court.

Weeping from the witness stand, Gibson said outside the presence of the jury, "I will not open my mouth no more," and started to walk from the courtroom.

Presiding Judge Herbert F. Murray quickly warned Gibson he could be jailed for contempt of court if he walked out.

Gibson stopped and looked at the judge with his arms raised in a gesture of hopelessness and said, "You can sue me, you can cage me. Can you kill me and eat me, too?"

Gibson resumed his seat while attorneys in the trial conferred with Judge Murray. Moments later, as Public Defender Fred Warren Bennett arrived from his office a block away, two deputy marshals were called in to watch Gibson.

Bennett spoke privately with Gibson for a half hour in a nearby witness room.

Gibson, a slender, bespectacled 33-year-old man, then returned to the courtroom and said he would resume testifying.

Court sources said a possible mistrial was averted when Gibson agreed to resume.

Had he gone through with his threat, they said, attorneys for the police, who had not finished cross-examining Gibson, could have claimed their case was seriously damaged and demanded a mistrial.

Gibson did not specify why he had wanted to stop testifying, except to say his participation in the trial has "disrupted my life."

He testified last week he was "in fear for my life" if he continued testifying, indicating concern for reprisals against him by persons he may have implicated in criminal activity.

"I've been living for 15 1/2 years on borrowed time," he told Judge Murray today. "I should have been dead a long time ago."

The dramatic turn of events today was yet another in a series of surprise actions by Gibson since he began testifying last week against three members of a county police robbery detail known in police circles as the "death squad."

Visibly reluctant and nervous, the one-time informer has testified that Detective Joseph D. Vasco, now the second highest ranking official in the county police department, directed him to recruit participants for a robbery of a High's convenience store in Adelphi on June 8, 1967.

He said Vasco picked the date, time and location of the robbery and provided Gibson a getaway car. On the night of the robbery, police who were staked out at the store shot and killed William Hunter Matthews, 18, and arrested Marvin Rozier, 18.

Matthews' family, Rozier and survivors of another man shot and killed by police in a second alleged "death squad" stakeout, filed a $9 million federal civil damage suit, claiming the "staged robbery" tactics allegedly used violated 14th Amendment rights of due process.

Police deny Gibson was asked to recruit the two men and say Matthews was shot only after he ignored a warning by police and fired at an officer.

Throughout Gibson's six days of testimony, defense attorneys have attempted to discredit him, producing reports by state and county police investigators in which he indicated the High's robbery was initiated by Matthews and Rozier and not by Vasco or other police officers. Gibson testified that much of what he said in the reports were "lies."

At another point, he testified he told lawyers for the claimants against the police that he would say "anything they wanted" if they paid him $50,000.

Similarly, he said he told police he would "disappear" if paid $50,000. He acknowledged today that he has received no such sums.