The opposition leader and anticorruption crusader had been imprisoned since 2021 on charges widely viewed as trumped up for political retribution.