Iranian President Hassan Rouhani said on Tuesday Saudi Arabia cannot hide "its crime" of executing a Shi'ite Muslim cleric by cutting ties with Tehran, warning that discord could affect the fight against terrorism.

Saudi Arabia, Bahrain and Sudan broke all ties with Iran, and the United Arab Emirates downgraded its relations on Monday after the Saudi embassy in Tehran was stormed by protesters. Kuwait recalled its ambassador to Iran on Tuesday.

RELATED: Saudi man gets life in U.S. prison for ties to Africa embassy bombings

An angry mob broke into the embassy on Saturday night and started fires following protests against the kingdom's execution of cleric Nimr al-Nimr, a prominent critic of Saudi policy, and three other Shi'ites as well as 43 Sunni al Qaeda jihadists.

"Saudi Arabia cannot hide its crime of beheading a religious leader by severing political relations with Iran," Rouhani was quoted as saying by state news agency IRNA in a meeting with the Danish Foreign Minister Kristian Jensen in Tehran.

"We believe diplomacy and negotiations are the best way to solve problems between countries," he added. "Regional countries can save the region of terrorism dangers through unity."

RELATED: Iran strikes historic nuke deal with U.S. and world powers

The Iranian government is trying to calm tensions by distancing itself from the attack on the Saudi embassy and even blaming foreign elements for organizing it.

Iranian government's spokesman called the attack "suspicious" and "in favor of Saudi Arabia's policies."

"A few people - with whom it's not clear which country's interests they are serving - took advantage of people's feelings," Mohammad Bagher Nobakht was quoted by ILNA news agency on Tuesday.

Iran's Justice Minister Mostafa Pourmohammadi was also quoted by Iranian media as saying "the latest action against the Saudi embassy could be planned and supported by infiltrated agents."

RELATED: Stop Iran rally gathers crowd in Times Square

President Hassan Rouhani has referred to the embassy attackers as extremists and said Iran should put to an end to attacking embassies once and forever.

Iran celebrates the anniversary of the 1979 takeover of the U.S. Embassy in Tehran every year and refers to it as the Second Revolution. Since then, Iranians have attacked several embassies in Tehran including those of Kuwait in 1987, Saudi Arabia in 1988, Denmark in 2006 and Britain in 2011.