Tanzania’s main opposition presidential candidate Tundu Lissu has been released shortly after his arrest in the main city Dar es Salaam.
Police arrested him outside Umoja House, a building where foreign embassies, including those of Germany and the Netherlands, are located.
Mr Lissu has rejected his defeat in last week’s election, saying the vote was rigged in favour of President John Magufuli.
A number of members of his opposition Chadema party, including the chairman Freeman Mbowe, remain in police custody.
Police have accused them of planning violent protests, including blowing up petrol stations and markets.
They had called for peaceful protests to demand a fresh election.