Official news agency IRNA reported that the 75-year-old Khamenei, who has the final say on all state matters and has been Iran's top leader since 1989, was in "good health" following a "successful" operation.
Khamenei was admitted to a government hospital in Tehran last Monday. A report posted on his website, khamenei.Ir, says he was discharged after a full recovery.
A medical team carrying out the operation has said the procedure took less than half an hour and was performed under local anesthesia.