A Palestinian shot dead two Israelis and wounded at least two others Thursday at a bus stop outside a West Bank settlement — close to where a terror attack days ago resulted in the death of a baby who was delivered prematurely, officials said.

The gunman got out of a car near the settlement of Ofra, north of Jerusalem, opened fire and fled, Israeli army spokesman Brig. Gen. Ronen Manelis told the daily Haaretz newspaper.

A manhunt was underway for the attacker and the driver, who abandoned their vehicle and escaped on foot in the direction of Ramallah after targeting both civilians and soldiers at the bus stop, the Times of Israel reported.

One of the wounded, a 21-year-old man, suffered a gunshot to the head and was listed in critical condition at a Jerusalem hospital.

“His condition is very serious. There is a threat to his life,” said a spokesperson for Hadassah Hospital Ein Kerem.

The other badly wounded victim is a female civilian who was taken to Shaare Zedek Medical Center’s trauma unit in Jerusalem, officials said.

The attack occurred on Route 60 about a mile from Ofra, where on Sunday several terrorists traveling in a car fired at a group of people standing at the settlement’s bus stop, hitting seven of them, including a woman seven months pregnant.

She was critically injured and her baby later died as a result of the attack.

On Wednesday, Israeli forces killed Salah Barghouti, a Palestinian suspect wanted in Sunday’s drive-by shooting.

It was not immediately clear if the two assaults were carried out by the same group, or the second was a copycat attack, army spokesman Lt. Col. Jonathan Conricus told the Times of Israel.

The Hamas terror group praised Thursday’s attack, but did not claim responsibility for it.

“The heroic Silwad operation is a response to the Zionist occupation’s crimes and behavior in the occupied West Bank,” tweeted Abdelaltif al-Qanou, a spokesman for the terror group.

“The West Bank’s youth and men will remain rebels against the occupation and continue to clash with it until it is banished.”

Also Thursday, police said an assailant stabbed two officers in Jerusalem’s Old City, wounding them lightly. The cops fatally shot the attacker, police spokesman Micky Rosenfeld said.

Police identified the man as a 26-year-old Palestinian from the West Bank. It released security camera footage that shows the man lunging toward the officers and appearing to stab them.

The latest shooting comes hours after Israeli security forces tracked down and killed a Palestinian accused of killing two Israelis and wounding another in an attack on a West Bank industrial zone in October.

Police said Ashraf Naalweh was found armed near the West Bank city of Nablus and was killed during an arrest raid.

“Israel’s long arm will reach anyone who harms Israeli citizens,” Israeli Prime Minister Benjamin Netanyahu said.

Police said it had made several arrests in its attempt to hunt down Naalweh and suspected he was planning on carrying out another attack.

With Post wires