At least two people have been killed and six injured in a drive-by shooting in Jerusalem, Israeli police said. The shooting is preliminarily being considered a terrorist attack, according to a police spokesman.

The incident took place near Israeli police’s National Headquarters located near the Ammunition Hill memorial site, according to Israeli police. A perpetrator was shooting from a car.

BREAKING At least 5 Israelis wounded in drive-by shooting attack in Jerusalem

1 critical terrorist shot & wounded. pic.twitter.com/vJqGYlHHSA — 💜♎ Tukang Sayur ♎💙 (@WC_Portable) October 9, 2016

The attacker escaped and headed to the tomb of the Hebrew prophet Samuel, 1.3 kilometers north of Jerusalem’s Ramot neighborhood.

Police officers were later able to “neutralize” the attacker, police said.

BREAKING: Drive-by shooting attack at Jerusalem light rail station. At least 4 wounded, at least 1 seriously. 1 terrorist neutralized. pic.twitter.com/VJgf7Nsfrl — Israel Breaking (@IsraelBreaking) October 9, 2016

"When the terrorist spotted the police he fired at them, and they managed to shoot and kill him," a police spokeswoman said, as cited by Reuters.

Police spokeswoman Luba Samri said that the attacker has been identified as a 39-year-old man from the east Jerusalem neighborhood of Silwan.

Two victims, a 60-year-old woman and a 30-year-old police officer, died in hospital following the attack, Haaretz reported.

The injured victims were taken to Hadassah Hospital Mt. Scopus, the hospital said, as cited by the Times of Israel.

The attacker was due to start a four-month jail sentence next week for assaulting a police officer, a spokeswoman for Israel’s Prisons Service said, as cited by Reuters.

Hamas has claimed responsibility for the attack. According to the organization’s spokesman, the attack was “a natural reaction” to the occupation “against our people.”

At least 218 Palestinians have died in attacks in the West Bank, East Jerusalem, and the Gaza Strip since 2015. Israeli authorities claim 147 of those were assailants, while the others were killed during protests or clashes.

Palestinians have killed least 33 Israelis and two visiting Americans, estimates from Reuters show.

However, Palestinians have accused Israel of constantly using excessive force, claiming that some of those killed had no intention of attacking and posed no threat. In some cases, Israel has opened investigations into whether excessive force was used.