Iraq's president on Sunday congratulated his Iranian counterpart Mahmoud Ahmadinejad on his re-election, becoming the second head of state to offer support for the hard-liner.

Iran has declared Ahmadinejad the victor but the results are being challenged by opposition candidate Mir Hossein Mousavi.

Iraqi President Jalal Talabani's office said he sent a congratulatory telegram to Ahmadinejad.

The victory shows support for Ahmadinejad personally as well as "the approach taken by the Islamic Republic" under Iran's supreme leader Ayatollah Ali Khamenei, Talabani said, according to a statement posted on his Web site.

Talabani, a Kurd, also expressed confidence "that the friendly and neighborly relations" will improve in the coming years.

Iraq faces a delicate balance in its relations with the United States and Iran. Many Shiite leaders in Iraq have close ties with Iran, which is also predominantly Shiite.

The head of one of the most influential Shiite parties, the Supreme Iraqi Islamic Council, also sent a congratulatory telegram to Iran, but he praised Khamenei for successful elections instead of mentioning Ahmadinejad.

"We saw the gathering of millions who cast ballots to express their right to elect the president," Abdul-Aziz al-Hakim said in the telegram, according to the TV station owned by his party, Al-Forat.

Al-Hakim is suffering from lung cancer and has been hospitalized in Iran.

A spokesman for anti-U.S. Shiite cleric Muqtada al-Sadr also endorsed Ahmadinejad.

"The re-elected president has great success in Iranian society, especially among the poor," Sadrist spokesman Salah al-Obeidi said. "He has more credibility than the reformists."