Brazilian President Jair Bolsonaro left hospital on Monday eight days after another operation on his stomach following his stabbing at a campaign rally last year.
Bolsonaro, 64, is still scheduled to attend the United Nations General Assembly in New York on Sep 24, where Brazil traditionally delivers the first address.
The President will continue his recovery at home and should follow medical guidelines related to diet and physical activity, said a statement from the Vila Nova Star Hospital in Sao Paulo.
The presidential convoy left the hospital early in the afternoon to fly back to Brasilia, the capital.
Bolsonaro had undergone a five-hour operation on his stomach - the fourth such procedure. He was forced to delay his original date for returning to work from Sep 13 until Sep 18.
His prolonged stay in hospital did not stop him delivering his regular on Thursday night live broadcast on Facebook, with a feeding tube still in his nose.
Bolsonaro a close ally of US President Donald Trump, was stabbed in September last year during his victorious presidential campaign.
He is expected to give his UN speech focused on the huge fires in the Amazon rain forest. He has rejected international criticism of his handling of the crisis.
The president understands that he must not expose himself to exhausting journeys ... while recognizing the importance of this trip, his spokesman said.