Law enforcement authorities had U.S. prosecutor Barry Leibowitz placed in an hypnotic state to get him to recall details about the man who shot him last Dec. 20, a U.S. magistrate was told yesterday.

Leibowitz testified that he could not recall what his assailant looked like below the lips before he went into a 3 1/2-hour session with a private specialist.

Under hypnosis, he was able to recall that the gunman had a full beard, Leibowitz testified. His recollections were so detailed that a police artist was able to put together a composite drawing that bears a striking resemblance to Robert Earl Lyons, the man charged with the shooting, law enforcement sources said.

Leibowitz's testimony emerged yesterday during a preliminary hearing for Lyons, a 28-year-old Northwest man who was arrested last week and charged with conspiracy to murder. After listening to Leibowitz and FBI agent Urey Patrick, U.S. Magistrate Lawrence S. Margolis kept Lyons jailed in lieu of $100,000 bond and ordered him held for grand jury action.

Leibowitz was shot and slightly wounded last Dec. 20 as he was going to work at the federal courthouse here. At the time he was heading an investigation into an alleged major heroin smuggling ring. Investigators say they believe the shooting is linked to that investigation.

In a calm. deliberate manner yesterday, Leibowitz testified that being shot was not at all what he thought it would be. "It was like getting hit with a baseball bat," he said.

Leibowitz testified that a car pulled to a stop about two strides in front of him and someone called his name. He stuck his head almost into the passenger side of the car, where he saw a man raise a gun, heard a slight noise, saw a shell casing eject into the back seat, and felt a bullet brush by his neck, Leibowitz testified.

The first shot shredded his necktie but did not strike him. Instinctively, Leibowitz testified, he turned away, but kept his eye on the man in the passenger's seat. "I think I said something like, 'What the f --'s going on?'" Leibowitz testified.

He said he had taken only about one step away from the car when the second shot was fired, striking him above the right hip. The car then sped away.

Leibowitz said he took several more steps, trying to duck between cars and elude his attackers, and then he realized he had been shot.

He said he then began yelling at courthouse guards to summon police.

Leibowitz was hospitalized, treated for a flesh wound, and released the next day.

Leibowitz testified yesterday that he remembers looking at the gun that shot him, but did not realize until later that a strange looking device on the end of it probably was a silencer. He said he thought at the time that it was a flare gun of some sort, and that the device looked like the exhaust on a power lawnmower.

Metropolitan police homicide detectives subsequently turned up a suspect, whose picture was nearly identical to that of the composite drawn while Leibowitz was under hypnosis, according to law enforcement sources.

FBI agent Patrick testified that he showed Leibowitz 12 photographs of men, and when Leibowitz picked out the one of Lyons, his voice tensed and his hand trembled. Leibowitz testified that when he saw the picture of Lyons, he felt like he was back at the scene, being shot at again.