BONN, West Germany (AP) _ A gunman shot and killed a Libyan exile and wounded two passersby on a busy street Saturday before he was wrestled to the ground by an off-duty policeman who was shopping in the area.

Police said the victim was Gebrel el Denali, 30, an opponent of Libyan leader Moammer Khadafy.

''It appears to be a political killing,'' said Bonn police spokesman Hans- Georg Classen.

Classen identified the gunman only as Fatahi T., and said he was a 29-year- old Libyan.He said police were questioning him, but had learned little because of translation difficulties.

''As far as I understand, he does not speak German or English,'' Classen said.

The gunman fired several shots with a 9mm pistol from the midst of a throng of shoppers.

''He could have hit a number of other people,'' Classen said in a telephone interview. ''In a way we were lucky.''

Denali was shot once in the head and twice in the body, and died at a hospital four hours after the shooting at 4:30 p.m.

Classen said the two wounded passersby were hospitalized. He said one, a 43-year-old woman who was shot in the stomach, was in serious condition. A 46- year-old man grazed by a bullet was in good condition.

Denali had lived for four years in West Germany, and had reported being harassed by Libyan nationals in the past, according to Classen.He said that in 1982, Denali reported he had been kidnapped by two Libyans and briefly detained and questioned in the Libyan Embassy in Bonn.

In London, a caller who gave his name only as Abdullah told The Associated Press that,''Denali was a well-known Libyan dissident.. . He's a student and has been active with the anti-Khadafy student union.''

The caller, who said he represented the anti-Khadafy National Front for the Salvation of Libya, added tht Denali had been ''a marked man as far as the Khadafy people are concerned for some time now.''