The five British men kidnapped in Iraq were taken in an operation led and masterminded by Iran's Revolutionary Guard, according to evidence uncovered during an extensive investigation by the Guardian.

The men – including Peter Moore, who was released today after more than two years in captivity – were taken to Iran within a day of their kidnap from a government ministry building in Baghdad in 2007, several senior sources in Iraq and Iran have told the Guardian.

They were incarcerated in prisons run by the al-Quds force, a unit that specialises in foreign operations on behalf of the Iranian government.

One of the kidnappers has told this paper that three of the Britons – Jason Creswell, Jason Swindlehurst and Alec Maclachlan – were subsequently killed after the British government refused to take ransom demands seriously.

Last night it emerged that part of the deal that led to the release of Moore involved the handing over of a young Shia cleric, Qais al-Khazali, a leading figure in the Righteous League, which emerged in 2006 and stayed largely in the shadows as a proxy of the Iranian Revolutionary Guard's elite unit, the al-Quds forces. Khazali was last night handed over by the US military for release by the Iraqi government.

• Moore was targeted because he was installing a system that would show how a vast amount of international aid was diverted to Iran's militia groups in Iraq.

• The bodyguards' bodies were eventually traded for the release of Iraqi prisoners.

• They had probably been dead for at least 18 months before three of their bodies were handed over earlier this year.

Moore, 37, a computer expert from Lincoln, and the four security guards were taken on 29 May 2007 from the Iraqi ministry of finance's technology centre in Baghdad. He had been a contractor working to install sophisticated software in the ministry to track down billions of dollars in international aid and oil revenues.

A group of up to 100 men entered the building and took the Britons, racing off into Baghdad traffic in a fleet of Toyota Land Cruisers. A sixth man – who the Guardian can reveal was Peter Donkin – was left by the kidnappers after he managed to hide under floorboards.

A former Iranian Revolutionary Guard member, speaking to this paper under condition of anonymity, said the extraordinary kidnap was masterminded by Iran. The man, a former major who worked for 14 years inside the Iranian organisation and claims to have taken part in kidnap operations himself, believes the hostages were held in two al-Quds camps in Iran – one known as Qasser Shiereen military camp, close to the Iraqi border crossing with Mehran, and a second camp known as the Tehran Pars, located near a salt lake north-east of Qom.

"It was an Iranian kidnap, led by the Revolutionary Guard, carried out by the al-Quds force," he said. "My contact works for al-Quds. He took part in the planning of the kidnap and he watched the kidnapping as it was taking place. He told me that they spent two days at the Qasser Shiereen camp. They then took them deep inside Iran."

This claim is backed up by a serving Iraqi minister with close links to Iran. "This was an IRG [Iranian Revolutionary Guard] operation," he said. "You don't think for a moment that those militia groups from Sadr City could have carried out a high-level kidnapping like this one."

A former intelligence chief at the Iraqi ministry of defence has also described to the Guardian how intelligence operatives followed the kidnappers as they took the hostages from a mosque in Baghdad's Sadr City to the Iranian border. "They were hooded and handcuffed, then the cars drove off in a new direction – they were headed towards the Iranian border," the intelligence chief said.

While the hostages were in Iran the kidnappers made sure those who took care of them were Iraqi nationals. "At all times they were surrounded by Iraqi voices. Everything was done to make sure they had no idea they were in Iran," said an Iranian source with knowledge of the kidnap.

The other Britons captured with Moore were all security guards. The bodies of Swindlehurst and Creswell were identified in June, followed by Maclachlan in September. McMenemy is also believed dead, although his body has not been returned. It is not clear where the men were killed. Their bodies were buried inside Iraq and information about their locations was traded for prisoner releases.

A Guardian report in July revealed evidence that Iraqi officials colluded in the kidnap of the five, and that one motive was to prevent millions of dollars of aid money from being tracked – including an estimated $18bn that had gone missing.

A former senior Iraqi intelligence chief claims the project Moore was working on would have laid bare exactly where all Iraq's money was going. He claims there was an Iranian link to the alleged financial cover-up. The Foreign Office said last night: "We have no evidence that the British hostages, including Peter Moore, were held in Iran. We are not in a position to say with any certainty where they were held during each and every single day."