An Israeli soldier’s body has been found with multiple stab wounds near a Jewish settlement in the occupied West Bank in what the prime minister, Benjamin Netanyahu, has called a terrorist attack.

The incident, which occurred between Bethlehem and the flashpoint city of Hebron in the West Bank on Thursday, sparked a manhunt by security forces and risked heightening Israeli-Palestinian tensions weeks ahead of Israeli polls on 17 September.

“Today in the early morning hours, a soldier’s body was found with stabbing marks on it adjacent to a [Jewish] community north of Hebron,” Israel’s army said in a statement. It did not elaborate on the circumstances or confirm whether the soldier was in uniform at the time.

Troops, police and the Shin Bet intelligence agency were searching the area, it said. Netanyahu called it “a serious stabbing attack.” The Israeli PM added in a statement: “Security forces are now in pursuit to capture the lowly terrorist and settle accounts with him.”

The newly drafted 18-year-old soldier was a student at a yeshiva – or Jewish seminary – in the settlement of Migdal Oz, near where the body was found. He was in a programme that combined military service with religious study, the seminary head told Israeli public radio.

“The soldier left for Jerusalem during the afternoon to buy a gift for his teachers,” Rabbi Shlomo Wilk said. “He was in contact half an hour before he was murdered. He was on the bus to the yeshiva. About 100 metres from the bus stop, before he entered the settlement, he was murdered.”

Israeli police blocked access to the area around where the body was found and medics were at the scene.

The body appeared to have been located about 30 to 40 metres outside the gate of the settlement.

Palestinian attacks against Israeli security forces and settlers occur sporadically in the West Bank, which has been occupied by Israel since the 1967 six-day war.

Such attacks and Israeli arrest raids that follow often boost tensions.

The incident came at a sensitive time, ahead of Israel’s general election next month. It also occurred just before the Muslim Eid al-Adha holiday.

Netanyahu would seek to avoid a ramping up of tensions in either the West Bank or the Gaza Strip before the elections, but he would also likely face political pressure to act firmly.

His main challenger, the former army general Benny Gantz of the centrist Blue and White Alliance, sent condolences to the soldier’s family and spoke in stark terms.

Gantz said: “The [military] and Israeli security forces will know how to get their hands on these loathsome terrorists, dead or alive.”

About 400,000 Israelis now live in settlements in the West Bank next to about 2.6 million Palestinians.

In April, Netanyahu pledged to annex settlements in the West Bank, which would be a deeply controversial move. Annexing settlements on a large scale could dash already fading hopes for a two-state solution to the Israeli-Palestinian conflict.

• The sub-heading of this article was revised on 12 August 2019 to paraphrase Netanyahu’s statement.