Zanzibar's main opposition leader has been allowed to register as a voter for October's election after appealing against his initial refusal.
Hamad says he was cheated of victory in previous elections
If his ban had been upheld, he would have effectively been disqualified from standing as a candidate.
Seif Shariff Hamad said he was happy at the decision but also called for a similar reversal for "hundreds of other Zanzibaris".
A new law requires voters to have lived in their constituency for three years.
Officials from Mr Hama's Civic United Front (CUF) say some 32,000 people have been refused as voters.
The voter registration exercise was also marred by violence.
At least nine queuing to register went to hospital after being assaulted by a group of 70 unknown men wielding iron bars and machetes.
The CUF accuses the ruling CCM party of rigging previous elections and using violence and intimidation against its supporters.
The CUF enjoys most of its support on the semi-autonomous archipelago but the CCM party has won recent elections on the islands as well as on the mainland.