Former Mongolian President Nambar Enkhbayar has been freed on bail a month after he was jailed on accusations of corruption, his family and activists say.
He had been on hunger strike to protest his innocence, and is now being treated in hospital.
Mr Enkhbayar had been planning to stand in parliamentary elections next month as the head of a new political party.
He served as prime minister and then president for nearly a decade.
But he left office following an election defeat in 2009.
Mr Enkhbayar, while free on bail for medical reasons, is still being treated in hospital according to Amnesty International human rights organisation.
Amnesty said it had no information on Mr Enkhbayar's condition: he has been on hunger strike for more than a week.
Mr Enkhbayar was detained on 13 April 2012 when scores of police officers stormed his house.
The Mongolian authorities said he had failed to respond to their demands that he appear for questioning.
State anti-corruption investigators accuse Mr Enkhbayar of misusing state assets while he was in power.
Activists say the authorities want to keep him out of the forthcoming election. They complain that he has been denied basic legal rights in jail.
On 12 May Amnesty appealed to the Mongolian government to ensure that he was treated in line with international human rights standards.
Since the collapse of Soviet communism 20 years ago, Mongolia has been praised in the West for its transition to democracy.
But analysts say corruption and the rich-poor divide are a constant source of public frustration, with many Mongolians yet to see the benefits of economic growth.