Mahmoud Ahmadinejad
Mahmoud Ahmadinejad Reuters

Former Iranian President Mahmoud Ahmadinejad on Sunday took to Twitter to weigh in on a spat between U.S. President Donald Trump and basketball star LeBron James, The Associated Press reported.

“In my opinion everyone especially a President should love all, and not differentiate between them,” wrote Ahmadinejad, who added that he loved NBA greats James and Michael Jordan, as well as former Denver Nuggets player Mahmoud Abdul-Rauf.

His comments follow a tweet by Trump on Friday night in which he appeared to mock James’ intelligence after he gave an interview to CNN and criticized the American president.

Ahmadinejad uses Twitter despite the fact that, while in power, he was instrumental in banning the social network in the Islamic Republic.

Iran is notorious for the limitations it imposes on freedom of expression. Tehran also blocks access to numerous websites, including Facebook and Twitter, to stop Iranians from browsing content it considers immoral, or as undermining the regime.

In addition, the Islamic Republic regularly detains journalists who are deemed to be against the government.

It remains unclear why Ahmadinejad decided to weigh in on the Trump-James issue.

Ahmadinejad, who had sought to run against his successor, Hassan Rouhani, in the last election, was barred from doing so by Iran's Guardian Council, which is in charge of vetting presidential candidates.

He was recently arrested by Iranian authorities and was accused of inciting anti-government protests. The arrest came after he had reportedly attended a rally in which he publicly criticized the government.