Mexico City (CNN) -- Mexican President Enrique Peña Nieto underwent thyroid surgery Wednesday.
The operation to remove a nodule was successful, said Aurelio Nuño Mayer, head of the president's office.
"The president is already awake, and he is already in the room," Nuño told reporters. "Everything went very smoothly, as planned.."
Gen. Fernando Arcaute Velazquez, director of Mexico's Central Military Hospital, said doctors found "no evidence of malignancy" during the procedure.
Officials said Peña Nieto will spend half of his four-day recovery period at the hospital, and the rest in his official residence.
Peña Nieto, 47, assumed Mexico's presidency in December.
Thyroid nodules are lumps that form within the gland, which is located at the base of the neck, according to the Mayo Clinic.
"The great majority of thyroid nodules aren't serious and don't cause symptoms," the clinic says on its website. "Thyroid cancer accounts for a small percentage of thyroid nodules."
Last week, Peña Nieto said that doctors had detected the small cyst seven or eight years ago.
"The doctors tell me that it is not a serious matter or anything," the president said, according to Mexico's state-run Notimex news agency. "Simply I have been postponing it and according to medical recommendations it is a good moment to do it."
CNN's Marysabel Huston-Crespo and Catherine E. Shoichet contributed to this report.