Tehran: Iran's hardline former president Mahmud Ahmadinejad became the latest leader to join Twitter on Sunday, despite having been instrumental in getting it banned from the country.

Ahmadinejad's first tweet from his personal account was a video in which he called on people to follow him at @Ahmadinejad1956.

"In the name of God Peace be upon all the freedom loving people of the world," he wrote in English.

Despite the service being blocked for ordinary citizens, many of Iran's top officials tweet regularly, including President Hassan Rouhani and Foreign Minister Mohammad Javad Zarif.

Even the office of supreme leader Ali Khamenei maintains accounts in several languages.

Iranian users -- who get round the restrictions using privacy software -- were quick to point out the irony that Twitter was banned following mass protests against Ahmadinejad's re-election in 2009.

The protests, which followed accusations of election-rigging, were considered the first time in the world the service was used to promote and organise demonstrations, and earned the nickname "The Twitter Revolution".

Twitter and other social media sites would go on to play a significant role in protests around the Middle East during the so-called "Arab Spring" in the following years.

Ahmadinejad, who was president from 2005 to 2013, has been pushing for a return to frontline politics in the run-up to the presidential election in May.

However, his erratic and insubordinate style saw him fall out with the conservative establishment during his time as president, and Khamenei advised him last year against running again.