Pelé has had an apparent tumor on the right side of his colon removed in an operation.
Albert Einstein Hospital in Sao Paulo said on Monday the 80-year-old soccer great is in an intensive care unit and will be transferred to a regular room on Tuesday.
The operation was a "great victory," Pelé said on his social media channels on Monday.
He went to the hospital for routine exams last week when the tumor was found. The hospital said in a statement the tumor was identified during routine cardiovascular and laboratory exams. It added it collected samples to be analyzed for pathologies.
"I thank God for feeling very well and for allowing Dr. Fábio and Dr. Miguel to take care of my health," Pele said.
"Last Saturday I underwent surgery to remove a suspicious lesion in the right colon. The tumor was identified during the tests I mentioned last week.
"Fortunately, I'm used to celebrating great victories alongside you. I will face this match with a smile on my face, a lot of optimism and joy for living surrounded by the love of my family and friends."
Edson Arantes do Nascimento, globally known as Pelé, was hospitalized last Tuesday. He used his social media channels to deny he was in poor health.
"Guys, I didn't faint and I'm in very good health. I went for my routine exams, which I had not been able to do before because of the pandemic. Let them know I don't play next Sunday," he joked in the tweet.
Pelé, the only male player to win three World Cups, has had mobility problems since a failed hip replacement surgery in 2012. He has been forced to use walkers and wheelchairs in public. He has also been admitted to hospitals in recent years for kidney and prostate procedures.
Pelé won the 1958, 1962 and 1970 World Cups, and remains Brazil's all-time leading scorer with 77.