Tanzania's main opposition party on Wednesday said it would boycott the electoral process until further notice after by-elections that it said had been wrecked by "militarisation" by the authorities.
Freeman Mbowe, president of the Chadema party, told a press conference, "We can no longer take part in elections of this kind. Democracy is being taken hostage.
"There is an excessive militarisation of the electoral process. Going to vote these days is like going to war."
The by-elections last Sunday took place in constituencies for two parliamentary seats and for 40 local officials.
The vote took place amid a massive presence by armed police and turnout was a record low.
"At many ballot stations, our representatives were prevented from observing voting, others were arrested or beaten," Mbowe said.
"These days, the outcome of elections is decided by the president and the security forces, in violation of our laws and constitution. It's as if there were no more laws."
Mbowe vowed that Chadema would not stand by passively, announcing that it would petition the court of the justice of the East African Community (EAC), a regional bloc of six Great Lakes nations, and the African Court on Human and Peoples' Rights.
It will ask the courts to set up an independent election commission, he said.
In August, the United States criticised "violence and irregularities" that had marred 70 by-elections in Tanzania, in a statement that sparked an angry rebuttal by the ruling CCM party.
Since his election in 2015, President John Magufuli has also closed several critical newspapers and rights groups have protested against the imposition of restrictive laws on freedom of expression.
* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and Facebook