Iran's former president Mahmoud Ahmadinejad has penned an open letter to Donald Trump commending him on his stand against "corrupt" US political system while also offering advice for his presidential term.

Despite recent tensions between Iran and the US, the 3,500-word communication, sent to the Swiss Embassy in Tehran on 26 February, has a conciliatory tone and Ahmadinejad pointed out early on that it was in "no means political" but was meant to be from a "humane standpoint rooted in interest toward and compassion for the American nation and other nations".

"Having been elected the US president is a historic opportunity primarily for the elected person and secondly for the electorates and other nations," he wrote in his letter. "Although four years is a long period, but it ends quickly. The opportunity needs to be valued, and all its moments need to be used in the best way."

Mahmoud Ahmadinejad
Ahmadinejad accused the US of exerting dominance over the United Nations Getty Images

The 60-year-old did however, criticise Trump's travel ban which would have barred entry into the US for travellers from Iran along with six other Muslim countries. "The developments and the current existence of America today is the result of immigration of a variety of nations to that land," he wrote, pointing out that more than 1 million people living in America have Iranian roots.

"The presence and constructive effort of the elite and scientists of different nations, including the million-plus population of my Iranian compatriots, has had a major role in the development of the US.

"In other words, the contemporary US belongs to all nations, including the natives of the land. No one may consider themselves the owner and view others as guests or immigrants," he continued.

Ahmadinejad went on to slam the previous US administrations for assuming arrogance towards other nations while pursuing possession and welfare of American people in others' poverty. He accused US of exerting "dominance" over the United Nations, and blamed American interference in world affairs for being the cause of "insecurity, war, division, killing and (the) displacement of nations".

The hardliner, who held the Iranian presidential position from 2005 to 2013, also wrote letters to other US presidents George W Bush and Barack Obama.

His address comes at a time of increased tensions between the US and Iran after Trump imposed sanctions against the country following Tehran's recent large-scale military exercises.