Two Palestinian gunmen opened fired at an Israeli security patrol near a section of the separation barrier on the edge of Jerusalem on Saturday night, wounding two security guards - one seriously - police and rescue officials said.
The attackers were shot and killed by the wounded security personnel.
A Palestinian bystander was also killed in the shootout. Police said he was apparently killed by the gunmen.
The shooting attack took place during a routine patrol in the Arab village of Sheikh Said, adjacent to the Jewish neighborhood of Armon Hanatziv on the southeastern rim of the city.
The two assailants made their way on foot to the area and ambushed the patrol, then tried to flee, Jerusalem police spokesman Shmuel Ben-Ruby said.
An offshoot of the Aksa Martyrs Brigades, affiliated with the Fatah Party of Palestinian Authority Chairman Mahmoud Abbas, claimed responsibility for the shooting, according to the Palestinian news Web site Maan, the Associated Press reported.
A Magen David Adom spokesman said one of the Israeli security men, 26, was shot in the chest and was in serious condition, while the other was hit in the limbs and in moderate condition. Both were evacuated to Jerusalem's Hadassah-University Hospital at Ein Kerem.
A police helicopter searched for any accomplices for a couple of hours after the attack.
The routine barrier patrol includes border policemen and civilian guards. The barrier going up around Jerusalem is meant to thwart Palestinian suicide bombers from entering the city. Over the last two years, there have been no suicide bombings in the city, and shooting attacks have become very rare.