WASHINGTON - U.S. President Barack Obama said on Friday his hopes for a direct dialogue with Iran had been affected by what he described as the brutality of Tehran's outrageous crackdown on protesters in the aftermath of its disputed election.

There is no doubt that any direct dialogue or diplomacy with Iran is going to be affected by the events of the last several weeks and we don't yet know how any potential dialogue will have been affected until we see what has happened inside of Iran, Obama told a joint White House news conference with German Chancellor Angela Merkel.

There are going to be discussions that continue on the international stage around Iran's nuclear program. I think the direct dialogue between the United States and Iran and how that proceeds, I think we're going to have to see how that plays itself out in the days and weeks ahead, he said.

Obama rejected a demand for an apology from Iranian President Mahmoud Ahmadinejad, who said Obama was interfering in the Iranian election.

I don't take Mr. Ahmadinejad's statements seriously about apologies, particularly given the fact that the United States has gone out of its way not to interfere with the election process in Iran, he said.

The U.S. leader praised Iranian protesters, saying: Their bravery in the face of brutality is a testament to their enduring pursuit of justice. The violence perpetrated against them is outrageous.

He said Ahmadinejad's chief rival, former Prime Minister Mirhossein Mousavi, had captured the imagination of Iranians who want to open up to the West.

Obama reiterated U.S. concerns about Iran's nuclear program, which Washington fears is to develop atomic weapons but Tehran says is for generating nuclear energy.

Iran's possession of nuclear weapons will trigger an arms race in the Middle East that would be bad ... for the security of the entire region, Obama said.

So even as we clearly speak out in a unified voice in opposition to the violence that's taken place in Iran, we also have to be steady in recognizing that the prospect of Iran with a nuclear weapon is a big problem.

(Editing by David Storey)