Three Israeli soldiers were wounded on Sunday when a member of the Palestinian Authority security forces opened fire at an IDF checkpoint near Beit El in the West Bank. He was shot dead by forces at the scene.

Magen David Adom emergency services said that two victims were in serious condition with wounds to the neck and thigh, respectively, and one was lightly hurt.

The shooter drove up to the Focus checkpoint in a car, was asked for his ID, got out and opened fire with a handgun, injuring the three soldiers. Palestinian reports named him as Amjad Sakari, 35, and said he was a member of the Palestinian Authority security forces who was working as a bodyguard for the Ramallah district attorney.

“Forces at the scene responded to the attack and shot the assailant, resulting in his death,” the IDF said in a statement.

An Israeli man wounded in a shooting attack in the West Bank is wheeled into the emergency room at Shaare Zedek Medical Center in Jerusalem on Sunday, January 31, 2016 (Yonatan Sindel/Flash90)

An Israeli man wounded in a shooting attack in the West Bank is wheeled into the emergency room at Shaare Zedek Medical Center in Jerusalem on Sunday, January 31, 2016 (Yonatan Sindel/Flash90)

The victims were treated at the scene by army medics and were evacuated to hospitals in Jerusalem for treatment.

“Medics and paramedics, with assistance from an IDF medical team, administered medical aid and are evacuating to hospitals in Jerusalem three young men around 20 years of age,” the Magen David Adom ambulance service said in a statement.

“One of them is in serious condition with a gunshot wound to the upper body, another is in serious condition with a gunshot wounded to the extremities, and a third is [in] light [condition] with a gunshot wound to the extremities,” the statement said.

The army later confirmed that the wounded were IDF soldiers manning the checkpoint.

Sakari, the shooter, hinted at his plans in Facebook posts Saturday and Sunday.

An undated photo of Amjad Sakari, a member of the Palestinian Authority said to have carried out a shooting attack in the West Bank on Sunday, January 31, 2016 (screen capture: Twitter)

An undated photo of Amjad Sakari, a member of the Palestinian Authority security forces said to have carried out a shooting attack in the West Bank on Sunday, January 31, 2016 (screen capture: Twitter)

“There are things on this earth that make life worth living,” he wrote in a post two hours before the attack. “However, unfortunately, I don’t see life worth living under occupation — suffocating us, and killing our brothers and our sisters. Please Allah, have mercy on our martyrs, heal our injured, and break the bonds of our prisoners. You were the previous ones, and Allah willing, we will be the next.”

“Every day we hear news of a death,” he wrote in another post Saturday night. “Forgive me, perhaps I will be next.”

Sunday’s attack — the latest in a months-long wave of deadly Palestinian car-rammings, stabbings and shootings — came a day after an Israeli-American teenager was wounded in a stabbing in Jerusalem and four days after an Israeli man was seriously injured in a stabbing in a settlement north of the city.

Stuart Winer and Avi Issacharoff contributed to this report.