The People's Mujahedin Organisation of Iran (PMOI) is an Iranian opposition movement in exile that battled the Shah from the 1960s and was once allied to Ayatollah Ruhollah Khomeini before falling foul of his Islamic regime.

Its fighters were later denounced as traitors for fighting alongside Iraqi troops in the latter part of the eight-year Iran-Iraq War which began when Saddam Hussein invaded Iran in 1980, a year after the Islamic revolution.

On Tuesday, an Iranian alleged former prosecutor will go on trial in Sweden over mass executions of Mujahedin militants by the Islamic republic in 1988.

The Mujahedin -- known as the MEK in Farsi -- was formed in 1965 to fight the royalist regime of Shah Mohammad Reza Pahlavi, with most of its founding members later dying in prison.

After the 1979 Islamic revolution, the group -- which has Marxist leanings and describes itself as belonging to "democratic and secular Islam" -- sought to overthrow the current Iranian regime.

It was outlawed in Iran in 1981, the year authorities accused it of a bomb attack that killed 74 people including Ayatollah Mohammad Beheshti, the regime's number two at the time.

The group was also accused of being behind a June 1981 bomb attack against future supreme leader Ali Khamenei, which left his right hand paralysed.

Thousands of Mujahedin members were killed in a crackdown by the Islamic regime. Those who survived were chased out of Iran.

Their leader Massoud Rajavi created the National Council of Resistance of Iran (NCRI) in France.

The council is considered to be the political wing of the PMOI and is one of several Iranian opposition groups.

Rajavi was expelled from France in 1986 amid a warming of relations between Paris and Tehran.

The Mujahedin then set up in Iraq at the height of the war with Iran, fighting alongside Saddam's forces.

The People's Mujahedin of Iran is no longer on the EU or US lists of terrorist organisations
The People's Mujahedin of Iran is no longer on the EU or US lists of terrorist organisations AFP / JEAN-CHRISTOPHE VERHAEGEN

Since 1989 the Mujahedin has been led by Rajavi's wife Maryam, who was given refugee status in France.

She and some 160 others were detained there in 2003 as part of a crackdown on the Mujahedin, but was released after two weeks of protests by her supporters.

Massoud Rajavi has not been heard of since the US-led invasion of Iraq in 2003.

Mujahedin fighters have claimed responsibility for several operations in Iran, including against oil installations in 1993, and have been blamed for dozens of murders.

After Saddam was toppled in 2003, the Mujahedin was disarmed by US forces and allowed to regroup at the Ashraf refugee camp north of Baghdad, which became the PMOI's largest base in exile.

In 2013, at the request of the US and UN, other countries -- notably Albania -- agreed to take in members of the group.

In 2009 the European Union removed the Mujahedin from its list of terrorist organisations, where it had been since 2002.

The United States did the same in 2012, having originally listed the group in 1997.

In 2014 France ended a vast decade-long judicial probe into its suspected terrorist activities without charges.

Former members of the group have accused it of evolving into a cult in exile -- claims it strongly denies, saying these are lies spread by the Iranian state.

The trial opening in Stockholm on Tuesday comes after a campaign led by Nobel laureates and former heads of state over the mass extrajudicial killings of leftwing prisoners by the Islamic authorities in 1988.

According to the NCRI, the Iranian regime killed 30,000 people in mass executions at the time. The real number is likely to be closer to four or five thousand.