Brazil's President Jair Bolsonaro. Photo: AP Photo/Markus Schreiber

Bogota - Brazilian President Jair Bolsonaro on Wednesday left hospital after a 17-day stay, during which he suffered complications following surgery, local media reported.

The 63-year-old was discharged with a "normalised" lung condition and restored bowel function, according to the medical report quoted by the daily Folha de Sao Paulo.

"I just have to thank God and everyone for finally being able to return to work in full normality," Bolsonaro tweeted.

The far-right president had surgery at the Sao Paulo hospital on January 28 to remove a colostomy bag he was given after being stabbed in the abdomen during an electoral campaign rally in September.

His departure from hospital was delayed twice. Doctors first had to drain an accumulation of liquid from where he had the colostomy bag, and he then developed a fever and symptoms of pneumonia, the medical report said.

During his stay, Bolsonaro was given antibiotics and was put on a liquid diet.

He downplayed the complications and said they had not been reported impartially.

Bolsonaro took office on January 1.

dpa