PESHAWAR/DERA ISMAIL KHAN, Pakistan (Reuters) - An explosion in a busy vegetable market killed at least 21 people on Saturday in Pakistan’s remote northwestern tribal region, an official said, in an attack jointly claimed by the Pakistani Taliban and a branch of the sectarian militant group Lashkar-e-Jhangvi.

About 40 others were wounded in the blast in Kurram region, near the border with Afghanistan, said Sajid Hussain Turi, member of the National Assembly from the region.

“We received 21 bodies of the local tribal people killed in the blast,” Turi said, adding that there would be a mass funeral followed by a demonstration over the attack.

Spokesmen for the Pakistani Taliban and Lashkar-e-Jhangvi Al Alami said the two groups coordinated the attack together.

Mohammad Khurassani, a spokesman for the Mehsud faction of the Pakistani Taliban, said the attack was to avenge Tuesday’s killing of the leader of Lashkar-e-Jhangvi (LeJ), Asif Chotoo, by police in the eastern province of Punjab.

Ali bin Sufyan, spokesman for LeJ’s Al Alami faction, told Reuters his group had coordinated the attack with the Pakistani Taliban. The Al Alami militants in the past have claimed to have coordinated attacks with Middle East-based Islamic State’s branch in Pakistan, including the November bombing of a Muslim shrine that killed 52 people, but the group also allies with the Taliban.

Reports differed on the cause of the explosion.

Turi said a homemade bomb had been planted in a pile of tomatoes and exploded as people gathered in the market in Parachinar, Kurram’s main town, early on Saturday morning.

Taliban militants have been active around Parachinar in the past, ad the town has also suffered sectarian tension between Sunni and Shi’ite Muslims.

Another Kurram official, Sabzali Khan, said early reports had suggested that a suicide bomber was responsible for the blast.

An eyewitness, Ashiq Hussain, said he saw bodies strewn around the market and wounded people crying out for help.

“There was no ambulance, and people had to carry the injured in cars and private pickup trucks to the hospital,” Hussain told Reuters.

A statement from Pakistan’s military said army helicopters had been dispatched to evacuate the wounded.