Mahloof, who represents the Galolhu North constituency in Malé, was arrested while leading an opposition protest on February 22.
He was charged with obstruction of justice for distributing masks to protect protesters from the effects of tear gas.
The lawmaker was kept in police custody for more than a month before he was transferred to house arrest in early April. He was among several politicians who were freed in the aftermath of President Abdulla Yameen’s election defeat in September.
In its judgment Sunday, the High Court ruled Mahloof’s arrest was in contravention of the parliamentary privileges law.
The criminal court previously dismissed terror charges raised against Mahloof for protesting outside the Maafushi prison. He was also charged with false reporting over a tweet about an alleged plan to kill jailed former vice president Ahmed Adeeb.
Mahloof, who was at the forefront of opposition demonstrations, served a prison sentence for police obstruction last year.
In April this year, the Parliamentarians for Global Action condemned Mahloof’s detention “on the basis of frivolous and politically-motivated criminal charges.” With constitutional due process rights suspended during the 45-day state of emergency, he was not taken before a judge within 24 hours.
Photo from Raajje.mv