I thought that was a pretty effective and well-crafted speech that President Obama delivered just now to the U.N. General Assembly on the perils of political extremism.

In the middle of the presidential campaign, it wasn’t a campaign speech, apart from the strong words on Iran, whose leadership was warned that time is “not unlimited” and that the United States will “do what we must” to stop Iran gaining a nuclear weapon.

But on the “politics of anger,” it was an interesting plea for tolerance. He won’t have done himself any favors with his Republican rival for invoking Gandhi.

Evoking Chris Stevens, the U.S. ambassador slaughtered in Benghazi during an attack on the U.S. Consulate in Libya, he managed to wrap in attacks on the leaders of Iran and Syria as he dwelt on the fallout from the anti-Islamic video that provoked violent protests across the Muslim world.

“Let us remember that Muslims have suffered the most at the hands of extremism,” he said. It was the first time that he has directly addressed Muslims at length since his Cairo speech in 2009, and noteworthy that when mentioning the death of Stevens, he pointed out that on the same day, there were Muslims killed in Turkey, Yemen and Afghanistan.

His main point, for me, was that violence and political repression is not the answer. To the leaders of the Arab Spring, he said, true democracy and real freedom is hard. “The strongest weapon against hateful speech is not repression, it is more speech — the voices of tolerance that rally against bigotry and blasphemy, and lift up the values of understanding and mutual respect.

“It is the obligation of all leaders, in all countries, to speak out forcefully against violence and extremism,” he went on, addressing representatives and leaders of some of the countries he had in mind as they watched from the U.N. General Assembly hall. Good luck with that, Mr. President.