Pele punctured his scheduled hospital stay due to a urinary infection.
The 81-year-old former soccer player was admitted on February 13 to continue treatment for his colon cancer, and days later doctors detected the infection, the Albert Einstein Hospital in Sao Paulo said in a statement on Monday.
“His clinical condition is stable and he should be discharged in the next few days,” the hospital established.
Pelé has undergone chemotherapy to treat the tumor that was found during a routine examination at the end of August. He was required in intensive care shortly after the colon operation, and has since recovered.
He was released on September 30, almost a month after he was admitted, but has spent more days in the hospital since then.
Pelé has been recovering at his home in Guarujá, on the outskirts of Sao Paulo. He posted various updates on his recovery on social media.
Pelé won the World Cups in 1958, 1962 and 1970 and is still the top scorer in Brazilian history, with 77 goals in 92 games.