Mr Soares was prime minister between 1976 and 1978, in the aftermath of the Carnation Revolution that ended decades of right-wing dictatorship.
A Socialist, he returned as PM in the early 1980s and served as president between 1986 and 1996.
He had been admitted to hospital in Lisbon last month following a "general worsening of his health", doctors said.
He had shown signs of improvement, but later fell into a deep coma from which he never recovered. The hospital, however, has not revealed the exact cause of death.
After flirting briefly with communism at university and then embracing Portugal's democratic movement as a Socialist, Mr Soares was jailed 12 times and then exiled for his political activities during the dictatorship of Antonio de Oliveira Salazar.
Mr Soares played a key role after the 1974 Carnation Revolution, a military coup that put an end to 48 years of Salazar rule.
A fierce critic of the junta that ruled Portugal for the next two years, Mr Soares in 1976 became the first post-war democratically elected prime minister.
He then spearheaded the country's entry into the European Union. But, in recent years, he became a vocal critic of the austerity policies associated with the massive eurozone bailout Portugal sought in 2011.
Mr Soares left the presidency in 1996 after the maximum tenure in the office permitted under the constitution, with his popularity at a peak. For years, he remained one of the country's most influential politicians.
He ran again for president in 2006 at the age of 82, but finished in third.
Portugal declared three days of national mourning from Monday.
"President Mario Soares was born and graduated to be a fighter, to have a cause to fight - freedom," President Marcelo Rebelo de Sousa said.
"Mario Soares never gave up on a free Portugal, a free Europe, a free world and what was decisive... he was always victorious."