President Barack Obama said on Monday he was deeply troubled by post-election violence in Iran and urged the Islamic republic to investigate voting irregularities in a way that would not result in bloodshed.

Obama said he would continue pursuing tough, direct dialogue with Tehran despite deep differences with incumbent President Mahmoud Ahmadinejad, who was officially declared the winner of last Friday's vote.

I am deeply troubled by the violence that I've been seeing on television, Obama told reporters after talks with Italian Prime Minister Silvio Berlusconi at the White House.

The democratic process, free speech, the ability of people to peacefully dissent -- all those are universal values and need to be respected, he said.

Obama stressed that the United States respected Iran's sovereignty and could not judge how the election was run because neither U.S. nor international observers were present.

The Iranian government says that they are going to look into irregularities that have taken place, Obama said.

It's important that moving forward, whatever investigations take place are done in a way that is not resulting in bloodshed and is not resulting in people being stifled in expressing their views.

Obama said the world was inspired by Iranian demonstrators who marched against what they say was a rigged election.

To those people who put so much hope and energy and optimism into the political process, I would say to them that the world is watching and inspired by their participation, regardless of what the ultimate outcome of the election was, Obama said.

Obama, a Democrat who has taken criticism from his Republican opponents for trying to engage with U.S. foes, said the election results did not alter his desire for direct diplomacy with Tehran.

We will continue to pursue a tough, direct dialogue between our two countries and we'll see where it takes us, Obama said.

The use of tough, hard-headed diplomacy -- diplomacy with no illusions about Iran and the nature of the differences between our two countries -- is critical when it comes to pursuing a core set of our national security interests.

(Reporting by Jeff Mason; Editing by Eric Beech)