Pakistan's security forces are under pressure to hold an inquiry after being accused by human rights groups of summarily executing suspected militants in the Swat valley.

Three months after Pakistani forces retook the area north-west of the capital, Islamabad, from Taliban fighters, corpses have been found dumped in streets. Nineteen bodies were found yesterday in Sair Taligaram. Another three turned up in Mingora, the region's main city, today, local residents said. Officers said the dead were all militants. Another 18 were recovered from different parts of Swat last week, officials said.

The independent Human Rights Commission of Pakistan suspects that security agencies carried out the killings and has demanded "a transparent and impartial inquiry into this issue by a multi-party parliamentary committee in collaboration with the representatives of the civil society". The HRCP says the military cannot simply explain the existence of mass graves by alleging that the bodies were of militants buried by other militants.

The Pakistani military has denied any involvement in the killings.

"This could be a result of revenge by the local people," said a spokesman, Major General Athar Abbas. "It could be a reaction to all that happened to the people in Swat."

Similar killings took place when the Taliban moved into the valley in 2007, eventually controlling much of the one-time tourist retreat. Then, militants killed police officers or alleged government collaborators, often beheading or stringing up the bodies of their victims in public. So many decapitated bodies were left in Mingora's main square that it was nicknamed "bloody square".

The militants also banned girls from school, flogged women in public, closed music and video shops and ordered men to grow their beards in line with their interpretation of Islamic rules.

The army launched a major offensive in April this year, causing two million people to flee the fighting. Pakistani forces claim to have killed more than 1,600 militants – including a key Taliban commander, Baitullah Mehsud. But while the insurgents have been pushed back, they have not gone away completely. Last week, Mingora was hit by two suicide blasts.

Most Swat residents interviewed by the media said they were unconcerned if Taliban militants were being killed, saying that they felt no pity for those who had brought terror and misery to the region and that the killings might be what was needed to stop the insurgents returning. Others, however, said they now feared the army.

"Previously we were afraid of the Taliban. Now, we're afraid of the army," one man told the Associated Press, at the site where the bodies of two people, 35-year-old butcher Gohar Ullah and his brother Zahoor, 30, were found last Friday.