Tanzania's main opposition leader, Tundu Lissu, and at least three others were briefly detained by police on Sunday after being accused of holding an unlawful assembly.
Mr Lissu was arrested in the northern town of Karatu, some hours before attending a rally near the Ngorongoro conservation area.
His party, Chadema, said they were detained at a hotel in the northern Arusha region. They were later released on bail.
Mr Lissu returned from exile in Belgium in January after President Samia Suluhu Hassan lifted a six-year ban on political rallies - imposed by her predecessor.
He has been criticising President Samia's administration for its handling of a controversial ports management deal and human rights violations.
Mr Lissu survived an assassination attempt in 2017 after being shot at least 16 times. He ran for president in 2020 but lost to the late leader John Magufuli.