SAO PAULO – After going through a “scare” in intensive care because of a urinary tract infection, Brazilian soccer great Pele left the hospital Tuesday after a two-week stay.

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 to undergo 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 his body initially did not respond well to the treatment, but his life was never in danger.

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.

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/tazzoni