An Afghan judge has been shot dead by unidentified gunmen in the western province of Farah, officials say.

The judge was abducted on Thursday and later shot dead before his body was publicly displayed late on Saturday. 

"The judge was abducted by militants and taken to an unknown area," Mohammad Naser Mehri, the spokesman for the Farah governor, told Al Jazeera.

"He was later shot and hanged, the body displayed to everyone."

READ MORE: First US raids target Afghan Taliban since Obama order

Mehri said an investigation has been launched into the attack.

The Khak-e Safid district where the judge was shot and hanged is an unstable area of the Farah province under Taliban control.

The group has yet to claim responsibility for the killing.

Violence has been rising sharply in recent months, with a series of roadside bombings and attacks, after the Taliban announced the appointment of its new leader, Mullah Haibatullah Akhunzada, last month.

The Taliban has warned they would retaliate against judicial authorities after Afghan officials ordered the hanging of six fighters, including four Taliban fighters, in May. 

READ MORE: Who is new Taliban leader Mullah Haibatullah Akhunzada?

Earlier in June, seven people, including the new head of a court in Afghanistan's south-eastern Logar province, were killed during an attack on the court claimed by the Taliban.

Obama decided in early June to expand US involvement with more air strikes against fighters, giving the Pentagon wider latitude to support Afghan forces, both in the air and on the ground.

The 9,800 remaining US troops in Afghanistan are scheduled to drop to 5,500 by the end of this year, but the pace of that decline has yet to be decided.

Source: Al Jazeera and agencies