Three Israeli soldiers were wounded, one of them seriously, in a shooting attack when a Palestinian police officer opened fire on them at a checkpoint outside the West Bank city of Ramallah on Monday, officials said.

The gunman approached the Focus checkpoint, near the Jewish settlement of Beit El, and opened fire with an AK-47 assault rifle at the troops stationed there, the army said.

“The force responded [to the attack] with return fire at the terrorist,” the army said.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The assailant was shot and killed by Israeli forces, an IDF spokesperson said.

The gunman was named as Muhammad Turkman, a police officer from Qabatiya, by both the official Palestinian Authority news outlet al-Hayat al-Jadida and Maj. Gen. Yoav Mordechai, the Defense Ministry’s Coordinator of Government Activities in the Territories.

The three soldiers were all approximately 20 years old and sustained “penetrating wounds” — meaning gunshot injuries — to the extremities, according to the Magen David Adom ambulance service.

One was seriously wounded in the attack, while two others sustained light injuries from shrapnel, MDA said.

“When we arrived at the scene, we spotted a fully conscious 20-year-old suffering from a gunshot wound to his lower extremities,” an MDA paramedic said.

The seriously injured soldier was taken to Jerusalem’s Hadassah Hospital Mount Scopus for treatment,

Upon arriving at the hospital, doctors upgraded the seriously injured soldier’s condition to moderate and stable, a spokesperson for Hadassah said.

The other two soldiers were taken to Hadassah Hospital Ein Kerem, according to MDA.

According to the PA outlet’s report, Turkman served in a “special forces unit.”

A photograph of the police officer, sitting next to an AK-47, quickly began circulating around Palestinian social media after the attack.

وزارة الصحة تعلن استشهاد محمد تركمان منفذ عملية إطلاق نار على حاجز بيت ايل وهو من الوحدات الخاصة بالشرطة الفلسطينية#انتفاضة_القدس #المقاومة pic.twitter.com/eHgRTJhPAC — وكالة صفا (@SafaPs) October 31, 2016

In a statement, the Hamas terrorist organization lauded the attack and encouraged other members of the Palestinian security services to carry out similar attacks.

While relatively uncommon, members of the Palestinian security forces have carried out attacks against Israeli soldiers and civilians over the past year.

In January, another member of the PA security forces, Amjad Sakari, 35, also opened fire at a group of soldiers manning the Focus checkpoint, injuring three of them before he too was shot and killed.

Some two weeks later, a Palestinian police officer, along with a companion, opened fire at a group of Border Police officers at the Damascus Gate. No Israelis were injured in the attack, while both assailants were shot dead in the ensuing gun battle with border guards.

Violence since October 2015 has killed 237 Palestinians, 36 Israelis, two Americans, one Jordanian, an Eritrean and a Sudanese national, according to an AFP count.

Most of the Palestinians killed were carrying out knife, gun or car-ramming attacks, according to Israeli authorities. Others were shot dead during protests or clashes, while some were killed in Israeli air strikes on the Gaza Strip.

Dov Lieber and the AFP contributed to this report.