Bangladesh's figurehead president, Zillur Rahman, died on Wednesday at a hospital in Singapore, aged 84.
Mr Rahman was a senior leader of the ruling Awami League party before parliament elected him president in 2009.
He was flown to Singapore's Mount Elizabeth Hospital on March 10 for treatment of respiratory problems. His body will be flown back to Dhaka, the president's office said.
The government declared three days of mourning.
Mr Rahman's death does not affect the government since Bangladesh is a parliamentary democracy, with the prime minister holding executive powers.
The president's office said parliamentary speaker Abdul Hamid will be acting president until the legislature elects a new president.
Prime Minister Sheikh Hasina offered her condolences and described Mr Rahman as a patriotic leader.
"His efforts helped lead to the creation of Bangladesh in 1971, and his subsequent decades of public service helped Bangladesh establish itself as the democracy it is today," US Secretary of State John Kerry said in a statement.
UN Secretary-General Ban Ki-moon said the late president "made important contributions to the country's democratic transition throughout his political life" and sent "heartfelt condolences" to Mr Rahman's family and the government and people of Bangladesh, UN spokesman Martin Nesirky said.