"The matter was dealt with by a surgical operation which was a complete success."

Talabani left the hospital on Thursday and would return to Iraq after a recovery period, the statement said.

"His return to Iraq is not far off," Mustafa Sowrash, a senior official in Talabani's party, was quoted by the Reuters news agency as saying.

The president's office offered no immediate explanation for why it had initially concealed the president's heart ailment.