Bangladesh's ailing former prime minister and opposition leader Khaleda Zia has been released from prison on humanitarian grounds, her party said.

The 74-year-old was freed on Wednesday for six months to allow her to undergo urgent medical treatment.

More:

Zia's release was granted on the condition that she will stay in the capital, Dhaka, for treatment of her diabetes and arthritis.

Her family had appealed for her to be allowed to go to the United Kingdom for treatment.

"She will now be treated by top Bangladeshi doctors," Zahid Hossain, vice chairman of Bangladesh Nationalist Party (BNP), told AFP news agency.

Hundreds of Zia's supporters greeted her in Dhaka - defying a government ban on public gatherings to contain the coronavirus pandemic - as she emerged in a wheelchair from a hospital where she had been kept in a special cell.

Zia, who has twice been prime minister, has been in jail since she was convicted in a corruption case in February 2018.

Zia, who shares a long-standing rivalry with incumbent Prime Minister Sheikh Hasina, was later convicted in a separate corruption case following her initial conviction in early 2018.

She was accused of misusing her power by embezzling some $250,000 in donations meant for an orphanage trust.

The BNP says the cases were fabricated and aimed at keeping Zia away from politics, allegations denied by Hasina's government.

"Questions remain whether Khaleda Zia's deteriorating health prompted the decision or the government was looking for an opportunity when the release will have the minimum immediate political impacts," said professor Ali Riaz from Illinois State University.

"By any measures, this is a shrewd political move by the government."