Iran has executed a group of 20 mostly Sunni prisoners, drawing condemnation from rights groups which said the convictions may have been based on forced confessions.

The men, who were hanged on Tuesday, were accused of carrying out a string of attacks against civilians and religious leaders in Iran's western Kurdish region, state media reported on Thursday.

"These people had committed murder ... killed women and children, caused destructions and acted against the security and killed Sunni religious leaders in some Kurdish regions," IRIB television quoted Prosecutor General Mohammad Javad Montazeri as saying.

He said all the executions - carried out by hanging - took place following a lengthy trial. 

The country's intelligence ministry issued a statement on Wednesday detailing 24 armed attacks between 2009 and 2011, including bombings and robberies, apparently by a single armed group, Tohid and Jihad. 

The group was responsible for 21 deaths during that period, the ministry said.

In 2009, the group allegedly assassinated two Sunni religious leaders Mamusta Borhan Aali and Mamusta Mohammad Sheikh al-Islam - a provincial representative of Iran's powerful Assembly of Experts.

"102 members and followers of the... terrorist group were identified... some of whom were killed in armed clashes with police forces and some were arrested. Some of those arrested were sentenced to death while some received prison terms," officials said.

There are almost seven million Kurds in Iran, making them the third largest ethnic group in the country. While there are some Shia Kurds, the majority are Sunni and live in four western provinces.

The International Campaign for Human Rights in Iran, an independent organisation based in New York, said the country's Supreme Court had rejected the appeal of one of the convicts, Shahram Ahmadi, against his death sentence, despite assertions his confession was made under torture.

Human Rights Watch (HRW) condemned Iran for what it said was the "mass execution of at least 10 prisoners". 

Rights groups have been critical of Iran's use of the death penalty, and according to Amnesty Interntional, the country executed at least 977 people in 2015.

Source: Agencies