A childhood friend of a man accused of the fatal shooting of an off-duty D.C. police officer in a Georgia Avenue go-go club last February told a D.C. Superior Court jury yesterday that the man told him he shot the officer when he "tried to play hero."

The testimony came during the trial of Gregory Earl Williams, 25, who the government contends fired the two shots from a 22-caliber revolver that killed Officer Bernis Carr Jr, 34, after Williams detected that Carr was police officer.

Ervin S. Waddy Jr., of Hyattsville, told the jury that Williams telephoned him shortly after the holdup and said, "We want to stick up this joint and there was this cop in there. He tried to play hero. I had to give it to him."

"He didn't want to do it but the way it went down, it was either him or them," Waddy testified that Williams told him. During his testimony, Waddy also told the jury that the gun identified by police as the murder weapon belonged to him.

Williams is charged with felony murder - murder during the commission of crime - armed robbery and assault with intent to commit robbery. Four other men, also arrested in connection with the holdup and shooting, have pleaded guilty in Superior Court to various charges.

Another witness yesterday, a girlfriend of one of the holdup men, testified that Williams told her that he had "fired on a cop" and said "the cop shot first."

Assistanct U.S. Attorney Harry R. Benner told the jury in his opening statement that the government's evidence would show that Williams discovered Carr was a police officer as he searched him for a wallet and found that Carr was wearing a holster.

The bar manager and two dancers who were in the club at the time testified that they heard one of the men shout "this . . . is the police. I ought to blow his brains out." At that time, the witnesses said, they heard gunfire, but were unable to see who fired the shots.

Benner contends that the evidence will show that Carr drew his service revolver and fired two shots before he was killed. One shot hit the bar ceiling and another wounded one of the holdup men, Joseph L. Wright, 21, in the elbow.

Williams' defense attorney, Carrie L, Fair, reserved her right to make an opening statement in the case. At the outset of the trial, she indicated to the court that she did not intend to call any witnesses in Williams' behalf. During the trial, she has repeatedly questioned government witnesses on their ability to identify Williams as one of the holdup men.

The incident occurred at about 7:45 p.m. last Feb. 16 at Jimi's Lounge at 4801 Georgia Ave. NW. According to the witnesses who were in the lounge, one man entered the restaurant first and asked to use a bathroom. Moments later, three men, one wearing a green ski mask, entered and announced a holdup, the witnesses testified. A fifth man remained outside in a gateway car, the government contends.

The government also contends that Williams was armed with a silver .22-caliber revolver during the robbery. Another man was armed with a sawed-off rifle, the third man carried a .32-caliber gun and the fourth man was unarmed, the government asserts.

After the shooting the men fled from the var with a small amount of money they had taken form a cash register, Benner said the evidence would show.

Williams childhood friend, Waddy testified that Williams and two or three other men had met with him earlier int he afternoon on the day of the incident and said they were interested in "making some money."

Williams later telephoned him, searched for a doctor to administer to the man injured in the holdup, and told him about the incident, Waddy said. Waddy told the jury he then told the police what he knew.

Three of the five men arrested in connection with the robbery and shooting of Carr have pleaded guilty to second degree murder and armed robbery. They are Calvin O. Gorham, 18, of 1365 Kennedy St. NW; Dion M. Wilson, 23, of 1322 Massachusetts Ave. SE, and Ricardo A. Roberts, 18, of 1224 Southern Ave. SE. The injured man, Joseph Wright, who lives at 1504 D St. NE, pleaded guilty to first-degree murder while armed. All four are awaiting sentencing.

The trial for Williams, who lives at 6333 Landover Rd., Cheverly, is expected to resume next week.