Iran's hardline president has ordered the formation of a team to study the damages the country suffered from the 1941 Allied invasion in order to demand compensation.

Mahmoud Ahmadinejad said Iran suffered immensely after it was invaded by Britain and the Soviet Union during World War II despite its declared neutrality and was never compensated.

"A team has been assigned to calculate all the damages (inflicted on Iran) in the Second World War. This will be an invoice they (Allies powers) must pay to the Iranian nation," he said in remarks broadcast live on state television on Saturday.

Ahmadinejad didn't elaborate on the details but he had earlier said he would write to United Nations Secretary General Ban Ki-moon to ask that Iran be compensated for the damages caused to its people during the war and for the use of its territory and resources by Allied powers.

Britain and the Soviet Union invaded Iran on August 26, 1941, codenamed "Operation Countenance" to secure Iranian oil fields and ensure supply lines for the Soviets fighting Axis forces.

Food, fuel and other essentials were scarce amid mounting inflation and there was great hardship on the Iranian people as the needs of invading powers were given priority.

"You inflicted lots of damages to the Iranian nation, put your weight on the shoulders (of the Iranian people) and became victors in the World War II. You didn't even share the war profits with Iran," Ahmadinejad said. "If I say today that we will take full compensation ... know that we will stand to the end and will take it."

Ahmadinejad also warned that Iran may also demand compensation for the damages it suffered during World War I, the Western support for the former Pahlavi Dynasty and its hostility towards Iran since the 1979 Islamic revolution.