Socrates, the captain of the Brazil team at the 1982 World Cup Finals, has been discharged from hospital after treatment for a stomach haemorrhage.
The 57-year-old was admitted to a Sao Paolo hospital with gastrointestinal bleeding on 18 August.
The hospital has said the haemorrhage was caused by high blood pressure in the vein carrying blood from the digestive system to the liver.
Socrates won 60 caps in Brazil's midfield, scoring 22 goals.
- Rated as one of the greatest midfielders of all time
- At 6ft4in tall he was known for his physical strength, as well as two-footed vision and skill.
- Played for Botafogo and Corinthians in Brazil before a one-season spell at Fiorentina.
- Saw out his career with Flamengo and Santos before retiring in 1989 aged 35.
- In 2004 aged 50 Socrates made an appearance as sub for Garforth Town in the Northern Counties League after a one-off deal to become player-coach
He led the flamboyant but ultimately unsuccessful Brazil team at the 1982 World Cup in Spain.
Brazil cruised through the first group-stage, scoring 10 goals, and then beat Argentina 3-1.
But despite a Socrates goal they were eliminated after losing 3-2 to Italy in the second game of the second group-stage.
Socrates also played in the 1986 World Cup in Mexico - not as captain - but missed a spot-kick as they lost to France in a quarter-final penalty shootout.
Socrates Brasileiro Sampaio de Souza Vieira de Oliveira, to give him his full name, delayed the start of his international career until the age of 25 so he could complete his studies as a doctor.
In his retirement, he has added a doctorate in philosophy and fathered six children, and he continues to practice medicine in the town of Ribeirao Preto in addition to being a commentator on both football and cultural issues.
He is also well-known for his smoking habit.
World Cup 1982 - Brazil thrash Scotland