TEHRAN– President Mahmoud Ahmadinejad called on Barack Obama on Thursday not to interfere in Iran's internal affairs after the U.S. president said he was appalled and outraged by post-election violence in the Islamic state.

Iran's tough security crackdown after its disputed June 12 presidential election, which Ahmadinejad won by a landslide according to official results, has led Obama to ramp up his previously muted criticism of Tehran.

Mr Obama made a mistake to say those things ... our question is why he fell into this trap and said things that previously (former U.S. President George W.) Bush used to say, the semi-official Fars News Agency quoted Ahmadinejad as saying.

Do you want to speak (with Iran) with this tone? If that is your stance then what is left to talk about, said Ahmadinejad.

His moderate opponents say the vote was rigged, a charge the authorities reject.

The turmoil in Iran has dimmed prospects for Obama's engagement with Tehran over its nuclear programme, with Ahmadinejad's government blaming Britain and the United States for fomenting violence.

Obama toughened his criticism of Iran on Tuesday for its crackdown on protesters demonstrating against the official election results, declaring scenes of death in Tehran heartbreaking.

In 2009, no iron fist is strong enough to shut off the world from bearing witness to the peaceful pursuit of justice, Obama said in Washington.

But the U.S. president declined to spell out any potential consequences for Tehran of the crackdown, and said there was still a path available to Iran in which it could operate within the international community.

Ahmadinejad said, according to Fars: What way of talking is this to the Iranian nation ... I tell them that all those people who voted and all the Iranian nation will stand against them.

A country which talks of change and cooperation, why did it fall into this trap. The Iranian nation sees and hears this talk and will make its decision ...

I hope you avoid interfering in Iran's affairs and express your regret in a way that the Iranian nation is informed of it, Ahmadinejad said.

He was speaking in the port town of Assaluyeh, where he was inaugurating a petrochemical plant.

(Reporting by Hossein Jaseb and Zahra Hosseinian; writing by Fredrik Dahl)