Brazilian President Jair Bolsonaro underwent surgery to remove a colostomy pouch he had installed after being stabbed in the stomach during the campaign in September.
Two days after the operation, he is expected to be in a tight bed rest, a Presidential spokesman said.
Vice President Hamilton Mourao has taken over the term of office of the President for this time.
On January 1
The doctors in Sao Paulo said the operation took nine hours; Mr. Bolsonaro is expected to fully recover.
He is expected to stay in the hospital for 10 days.
A colostomy bag is a small bag that is used to collect waste from the body when the digestive system stops working due to illness, injury, or a problem.
The 63-year-old president came to the hospital of São Paulo Israelite Albert Einstein on Sunday to undergo a test before surgery.
The Brazilian leader posted a video of himself dressed in a hospital gown and discussed recent events, including his flight over the mining site in the city of Brumadinho in Minas Gerais.
A dam burst into an iron ore mine on Friday, releasing a muddy water that killed at least 58 people and lost hundreds.
A police investigation has revealed that Mr Bolsonaro's assailant, Adelio Bispo de Oliveira, was politically motivated.