Doctors said the 74-year-old Pele will continue his recovery process at home and will need to rest for about a week. He will also need to undergo physiotherapy to recover some of the muscle mass that he lost during the time he spent in the hospital.
"It was really a scare," Pele said in a news conference broadcast live on Brazilian television. "What happened was a surprise to me. I was worried, of course, but I never had any fears about dying."
The three-time World Cup champion said he is doing fine and joked that he will be ready to play for Brazil as one of the three over-23 players at the 2016 Olympics in Rio de Janeiro.
"Thanks to God everything is fine now. I have recovered," Pele said. "I'm already preparing for the Olympics."
Pele spent several days in an intensive care unit while undergoing hemodialysis to help support his only kidney. Doctors said Pele, who had one kidney removed when he was still a player, had to be more closely monitored because of how his body reacted to the infection, but his life was never in danger.
Doctors denied that Pele was transferred to an intensive care unit because of signs of a generalized infection. They said the extra care was needed because there was excessive inflammation in his body caused by the infection, which is not uncommon, but he always responded well to the antibiotic treatment.
The infection stemmed from a Nov. 13 surgery to remove kidney stones which were diagnosed after Pele had to cancel an event at his museum in the coastal city of Santos because of abdominal pain. The surgery was deemed successful and he was released from the hospital just a few days after the procedure, but he had to be readmitted after a new medical evaluation showed signs of the infection.
Pele's condition was closely monitored in Brazil and the rest of the world since the hospital in Sao Paulo said last month that Pele became unstable and was transferred to an intensive care unit. The former player's staff all along downplayed the seriousness of the illness, however, and Pele even used his Twitter account to say that he was doing well.
Last week, Pele recorded a video message from his hospital room to thank his fans around the world for praying for him during his illness.
"I was moved with all the messages that I received from all over the world," he said Tuesday. "I didn't know so many people were paying attention to my situation."
Pele said he spent most of his time in the hospital watching local football and writing songs, including "one that will remain a secret for the Olympics." Pele, who recorded a few songs many years ago, had a guitar with him in his hospital room.
Pele said that although he wasn't overly concerned while in the hospital, the illness made him start reflecting a bit more about life.
"During a career of 30 years and while travelling all around the world, I had never gone through something like this before," he said.
Widely regarded as the greatest footballer of all time, Pele is a national hero in Brazil and remains a worldwide ambassador to the game. He is also active with his many businesses and still participates in many advertising campaigns.
Follow Tales Azzoni on Twitter at http://twitter.com/tazzoniSuggest a correction