Chadema said on X that its chairman, Freeman Mbowe, was taken into custody as he was preparing to “lead a peaceful protest”.
Police also went to the home of the party’s deputy leader Tundu Lissu with a convoy of 11 vehicles and arrested him, according to Chadema.
Critics fear that the detentions are a sign that the country could be returning to the more repressive rule of the previous President, John Magufuli.
Chadema had planned the demonstrations to protest against alleged recent killings and abductions of opposition officials in the country.
Last week, President Samia Suluhu Hassan advised against demonstrations and any related moves, noting that her administration would not tolerate any action that would endanger law and order.
Police declared the protests illegal, but the opposition had vowed to defy the ban.
Mbowe told journalists shortly before his arrest that “we’re paying the full price of democracy… as opposition leaders we have to show the way”.
Local news site The Citizen reported that journalists covering the protest were also being detained.
Early on Monday morning, police blocked access to the homes of the two Chadema leaders in Dar es Salaam and questioned people on whether they were attending the protest, the party said.
Later the same day, Mbowe and Lissu were released on bail, Chadema said, without stating what charges police planned to take them to court with.
Since Saturday, riot police had been deployed on key roads in Dar es Salaam.
Last year, President Samia lifted a ban on opposition gatherings and pledged to restore competitive politics, but for some, the recent incidents suggest a reversal of the promise of greater political freedom.
Rights groups and critics are concerned that the president’s tactics are aimed at intimidating her political adversaries as the country nears local government elections this November and the general election in October 2025.