Dhaka, Bangladesh (CNN) -- Bangladeshi President Mohammad Zillur Rahman died Wednesday at a Singapore hospital, where he was being treated for a lung infection, an official with his office said. He was 84.
Rahman was admitted to Mount Elizabeth Hospital on March 10. He died there Wednesday afternoon, according to the official, Mohammad Shafiul Alam.
He had been taken from the Bangladeshi capital, Dhaka, to Singapore by air ambulance after his health deteriorated and was suffering from acute kidney and respiratory problems when he died.
Bangladesh is a parliamentary democracy, meaning the role of the president is largely ceremonial. The president is elected by the parliament, while the prime minister is chosen in a general election.
Rahman, of the ruling Awami League, was elected to the position in 2009, becoming the 19th president of Bangladesh.
Prime Minister Sheikh Hasina and others offered their condolences on Rahman's death.
Born in 1929 in the Kishoreganj district of Bangladesh, Rahman became involved in politics when he was a student at Dhaka University.
He played a significant role in the country's war of independence in 1971 and was a close aide to the country's founder, President Sheikh Mujibur Rahman.
Mohammad Zillur Rahman became a member of the Provincial Assembly of East Pakistan, now Bangladesh, in 1970 and was elected a member of parliament five times after his country's independence.
As a senior figure in the Awami League, he was imprisoned for four years after the assassination of Sheikh Mujibur Rahman in 1975. He was again detained in 1986.
He served twice as the general secretary for the Awami League, which won a landslide victory in the 2008 general elections.
Zillur Rahman's wife, Ivy Rahman, also an Awami League politician, was killed in grenade attacks on a party rally in Dhaka that left 24 people dead and more than 200 injured in August 2004.
Sheikh Hasina, who is the daughter of Sheikh Mujibur Rahman, narrowly escaped the 2004 grenade attacks.