Pakistan's government was swift to accept a Taliban denial that it was involved in a devastating bomb attack on a vegetable market in Islamabad that killed 22 people.

The strong condemnation of the attack by the Taliban, which is responsible for the deaths of thousands of civilians since 2007, highlighted the anxiety on both sides to preserve a temporary ceasefire that is due to expire shortly.

Eyewitnesses described the carnage caused by the powerful device that exploded shortly after 8am in the busy wholesale market on the edge of the capital. The bomb contained shrapnel and had been placed near an area where guava fruit were being sold.

"Body parts were scattered everywhere," said Azam Khan, a young labourer who had been unloading fruit from vehicles nearby. "All I could see were bodies, blood and bleeding people being shifted into private cars because there were no ambulances."

Local hospitals said 22 people were killed while another 96 were injured, making it the deadliest attack in Islamabad since a truck bomb destroyed much of the Marriott hotel in 2008.

"We condemn the attack," said Taliban spokesman Shahidullah Shahid hours after the explosion. "Killing innocent women and children is against sharia."

In recent weeks the government and representatives of the Tehreek-e-Taliban Pakistan (TTP), as the movement is known, have help preliminary peace talks. The government has even released more than 30 Taliban prisoners despite the scepticism of many experts who argue a successful peace deal is unlikely.

The country's information minister, Pervaiz Rashid, claimed the TTP's condemnation was a positive sign because it indicated the movement was losing popular support.

But critics say the continuation of attacks throughout the ceasefire period either indicates the TTP is being dishonest or that many groups are outside its control, meaning even a successful peace deal is unlikely to quell terrorism.

Wednesday's blast came a month after suicide bombers killed 11 people in Islamabad's court complex. The TTP denied any involvement in the assault, which was claimed by the Ahrar-ul-Hind splinter group that rejects the peace process.

The director of a security thinktank in Islamabad, Imtiaz Gul, said: "The claim of unity within the TTP on the issue of talks really has to be taken with a pinch of salt. It has been very clear from day one that Ahrar-ul-Hind is fully represented in the TTP's talks committee."

There are fears the TTP is going along with the talks purely to stave off the threat of a military campaign against their sanctuaries in North Waziristan, an area bordering Afghanistan.

The Pakistani military has been lobbying for action but the prime minister, Nawaz Sharif, has been determined to exhaust options for a negotiated solution.

Gul said both sides were biding their time before an inevitable return to hostilities. He said: "For the Taliban, it lets them reinforce themselves while the government hopes to find out more about the people they are dealing with."