Thousands of mourners have gathered in Indonesia to pay their respects to the former president, Abdurrahman Wahid, as his funeral was held in East Java.
Often referred to by his nickname, Gus Dur, Wahid led the country from 1999 to 2001. He died on Wednesday aged 69.
He was the first elected president after the fall of the Suharto regime.
Mourners wept as they lit candles and burned incense for a leader who was widely renowned for his tolerance and openness to other faiths and ideas.
Wahid was removed from office in 2001 over unproven allegations of corruption, but remained politically active until his final years.
A nationally televised memorial service for Wahid, led by current president, Susilo Bambang Yudhoyono, began a week of national mourning.
Flags will be flown at half mast across the country.
Speaking at the memorial, Mr Yudhoyono said Wahid had made Indonesians "realise and respect the diversity of ideas and identities brought about by differences in faiths, beliefs, ethnicity and locality".
He was a Muslim, but he became a blessing to all faiths
Archbishop Julius Darmaatmadja SJ
"Whether we realise it or not, really, he was the father of pluralism and multiculturalism in Indonesia," he said.
The former leader was buried in his East Java hometown, Jombang, where about 5,000 supporters gathered to welcome his motorcade.
His supporters have held vigils at mosques, churches, temples and schools.
"Gus Dur was a saint. Every time he visited, I always came to receive his blessing," said mourner Maryamah, 47, in Jombang.
Such was the emotion in Jakarta that Gus Dur's wheelchair-bound widow, Shinta Nuriyah, and tearful daughter Yenny, were swamped by crowds.
Wahid's brother said he had been "humorous, happy, clever, brave" and that he had cared deeply about the community.
"He was full of life and his fighting spirit was strong. Even when he was sick, he would fight on," Salahuddin Wahid told the AFP news agency.
The Jakarta Post newspaper reported that news of Gus Dur's death had prompted spontaneous prayer gatherings across the country - and not only among fellow Muslims.
Prayer vigils have been held for Wahid across Indonesia
Jakarta Archbishop Julius Darmaatmadja SJ said Gus Dur had left an indelible mark on people of all faiths.
"He was a Muslim, but he became a blessing to all faiths," the newspaper quoted him as saying.
The leaders of Indonesia's political elite gathered at the funeral.
"We just lost a great statesman who fought to keep the country pluralist, while fighting fundamentalism," lawyer Todung Mulya Lubis said.
"He was a true democrat, respecting even his political foes."
Messages of condolence also poured in from abroad.
The White House said Wahid had been "a pivotal figure" in Indonesia's transition to a free government, who "will be remembered for his commitment to democratic principles, inclusive politics, and religious tolerance".
Australian Prime Minister Kevin Rudd said Wahid had been "much admired and respected not only within Indonesia, but also by many Australians and others throughout our region".
"Our thoughts go in particular to his family, including his widow and four daughters," he said.
The partially blind Muslim cleric came to power after defeating Megawati Sukarnoputri, the daughter of founding President Sukarno, in October 1999.
His win was a surprise - Mrs Megawati's party had won far more votes in the legislative polls - and a testament to Wahid's ability to build coalitions with other parties.
He used this skill to try to bring unity in the tumultuous post-Suharto years.
Educated in Indonesia, Egypt, Iraq and Canada, Wahid had a reputation for religious tolerance and moderate politics.
But he not been in the job long before his opponents accused him of failing to tackle the economic crisis, and doing little to resolve the secessionist conflicts in several provinces of Indonesia.
In July 2001, less than two years into the job, he was sacked by the country's national assembly amid unproven allegations of corruption and incompetence.
As well as his prominent political role, he was also a leader of Nahdlatul Ulama, a Muslim group with some 40 million members - and one of the largest independent Islamic organisations in the world.
He suffered several strokes and was confined to a wheelchair in his later years, but despite his fading health he remained an influential figure in politics.