People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)

JERUSALEM (AP) — Hundreds of people attended Thursday's funeral of an 18-year-old Israeli soldier who was found dead hours earlier with stab wounds near a Jewish settlement in the West Bank.

Prime Minister Benjamin Netanyahu denounced the killing as a terror attack and vowed the killers would be brought to justice. Israeli troops raided a nearby Palestinian village and the military said it was sending reinforcements to the West Bank.

The killing threatened to inflame tensions between Israelis and Palestinians just over a month before Israel's parliament elections. In response to the incident, Netanyahu's nationalist allies called for further West Bank settlement construction and a heavy handed response.

The soldier was identified as 18-year-old Dvir Sorek, from the West Bank settlement of Ofra, north of Jerusalem. He was a student at a pre-military Jewish seminary in the Gush Etzion settlement bloc, south of Jerusalem. His body was found on the side of a road near the seminary.

Army spokesman Lt. Col. Jonathan Conricus said the soldier was neither armed nor in uniform when his body was found. He said the military was investigating the circumstances of his death and searching for suspects.

As part of the searches, a column of Israeli jeeps entered the nearby Palestinian village of Beit Fajar, a mile (kilometer) south of where the body was found. Soldiers blocked the road and searched homes.

The military said it was calling up more troops to the West Bank in response to the incident.

There was no immediate claim of responsibility, but the Islamic militant group Hamas issued a statement praising the killing of the soldier.

"We salute the hero fighters, sons of our people, who carried out the heroic operation which killed a soldier of the occupation army," Hamas said in a statement. The Palestinian militant group Islamic Jihad also hailed the killing as "heroic and bold."

President Donald Trump's Mideast negotiator, Jason Greenblatt, attacked Hamas' statements, writing on his Twitter account that the militant group "chooses death & destruction over taking care of people they claim to lead."

Rabbi Shlomo Wilk, head of Sorek's yeshiva, told Israel Radio that the student had gone to Jerusalem to buy presents for the school's faculty. Wilk said Sorek had called a friend and said he would return on time.

"When he was late, we started to worry," Wilk said. "Fairly quickly we understood that something wasn't right and we got the police involved."

Sorek's father, Yoav, is the editor of a Hebrew language Jewish history magazine and the Shiloach Journal of for Policy and Thought.

Dvir was the grandson of a prominent religious nationalist rabbi, Benjamin Herling, one of the forerunners of the settlement movement, who was killed by a Palestinian gunman near the West Bank city of Nablus in 2000.

Netanyahu visited the scene of the attack Thursday evening. Earlier, the prime minister said in a statement that security forces were "in pursuit now in order to capture the despicable terrorist and bring him to account."

Speaking at the inauguration of new settlement homes in Beit El, north of Jerusalem, Netanyahu said Israel "will reach those who seek to harm us, we will strengthen our roots in our homeland."

President Reuven Rivlin offered his condolences and said the security forces were "pursuing the murderers and will not rest until we find them."

"Our prayers this morning are with the family of the murdered soldier and our hearts grieve for the life cut short," Rivlin said. "We fight terrorism without compromise to ensure the security of our people."

Yuli Edelstein, the speaker of Israel's parliament and a prominent figure in Netanyahu's Likud party, responded to the attack on Israeli public radio Thursday saying "we should move in the direction of exercising sovereignty over our settlements. To make it clear that terrorism will not drive us away," he said.

Israel captured the West Bank, along with east Jerusalem and the Gaza Strip, in the 1967 Mideast war.

The Palestinians seek the territories as part of a future state, with the occupied West Bank as the centerpiece and east Jerusalem as a capital.

Most of the international community considers Israel's West Bank settlements illegal and an obstacle to creating a two-state solution for the Israeli-Palestinian conflict. Israel considers the territories "disputed," and says the fate of the settlements should be determined through negotiations, which have been moribund for years.

The body of the soldier was found in the same region as the kidnapping and killing of three Israeli teenagers by Palestinian militants in the summer of 2014, an incident that helped precipitate a war between Israel and Hamas in the Gaza Strip.

___

Associated Press writer Shahar Golan in Jerusalem contributed to this report.

People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)
Israeli troops secure the area where a body of a soldier with stab wounds was found near Gush Etzion settlement in the West Bank, Thursday, Aug, 8, 2019. (AP Photo/Mahmoud Illean)
Israeli troops secure the area where a body of a soldier with stab wounds was found near Gush Etzion settlement in the West Bank, Thursday, Aug, 8, 2019. (AP Photo/Mahmoud Illean)
People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)
People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)
People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)
People attend the funeral of Israeli soldier Dvir Sorek, at the Israeli settlement of Ofra in the West Bank, Thursday, Aug. 8, 2019. Dvorek was found dead with stab wounds hours earlier Thursday. (AP Photo/Tsafrir Abayov)
Israeli troops secure the area where a body of a soldier with stab wounds was found near Gush Etzion settlement in the West Bank, Thursday, Aug, 8, 2019. (AP Photo/Mahmoud Illean)
Israeli troops secure the area where a body of a soldier with stab wounds was found near Gush Etzion settlement in the West Bank, Thursday, Aug, 8, 2019. (AP Photo/Mahmoud Illean)