Mahmoud Ahmadinejad, the former president of Iran, took to Twitter on Sunday to weigh in on the spat between President Donald Trump and LeBron James, the basketball star, at a time of rising tensions between the two countries.

Mr Ahmadinejad was barred from running in last year’s elections but showed he was still intent on returning to the spotlight with the sort of social media intervention that has come to define presidential politics in the wake of Mr Trump’s election.

“In my opinion everyone especially a President should love all, and not differentiate between them," he wrote on Twitter, which is banned in Iran.

He added that he loved NBA greats James and Michael Jordan, as well as former Denver Nuggets player Mahmoud Abdul-Rauf.

Mr Ahmadinejad, who served as president from 2005 to 2013, was known for controversial statements that included questioning whether the Holocaust took place and claiming there were no gays or lesbians in Iran.