DHAKA, Bangladesh — Bangladesh's Supreme Court on Wednesday upheld a High Court's decision to grant bail to opposition leader and former Prime Minister Khaleda Zia, who was jailed for five years on a corruption conviction.

Lawyers from both sides said the ruling does not necessarily mean Zia will be released from jail because she's been arrested in connection with three other cases.

The government had appealed a March verdict by the High Court granting her bail for four months.

On Wednesday, the Supreme Court also ordered authorities to make a final decision by July 31 involving a separate appeal by Zia seeking her release from jail.

Zia has been in jail for more than three months in the graft case for misusing power and embezzling about $250,000 involving a trust fund named after her late husband, former President Ziaur Rahman. The conviction means that Zia, the archrival of Prime Minister Sheikh Hasina, can be barred from running in December elections.

Zia's party says the February verdict was politically motivated, a charge the government has denied. Zia's Bangladesh Nationalist Party has threatened to boycott the next elections, saying they will not join the polls without Zia.

In February, a trial court convicted Zia and also sentenced her son, Tarique Rahman, and four others to 10 years in prison for involvement in the case. Rahman lives in London and was tried in absentia.

Bangladesh law says anyone imprisoned for more than two years cannot run for office for the next five years, but Law Minister Anisul Huq had said the final decision rests with the higher courts.

Bangladesh politics are deeply fractious, with rivals Hasina and Zia ruling the country alternately since 1991, when democracy was restored.

Both women came from political dynasties. Zia is the widow of Ziaur Rahman, a general-turned-president who was assassinated in 1981. Hasina is the daughter of Sheikh Mujibur Rahman, the country's independence leader and first president, who was assassinated in 1975 along with most of his family members.

In the last election in 2014, Zia's party and its political allies boycotted the race, allowing Hasina to return to power with a landslide victory.