MALE, Maldives — A high court in the Maldives on Thursday overturned a prison sentence for the country's former strongman, who had been jailed for not cooperating with a police investigation into allegations he was trying to overthrow the government.

The court set aside the jail term of one year, seven months and six days imposed by the Criminal Court on ex-President Maumoon Abdul Gayoom.

Maumoon was jailed in June for not handing over his cellphone to investigators after being accused of being part of a plan to overthrow his half-brother, outgoing President Yameen Abdul Gayoom. Maumoon was among dozens of political opponents and officials jailed by Yameen during his five-year rule after trials criticized for alleged lack of due process.

Yameen lost last month's presidential election to joint opposition candidate Ibrahim Mohamed Solih.

The court ruled Thursday that the lower court did not follow correct trial procedures.

Maumoon, however, still faces a separate case under the terrorism law over the same alleged plot to overthrow Yameen.

Soon after Yameen's defeat a court released Maumoon on bail. Some of Yameen's exiled political opponents also returned to Maldives.

Maldives became a multiparty democracy in 2008 after Maumoon's 30-year autocratic rule.

Yameen, who was elected in 2013, rolled back many of the democratic gains.