The opposition leaders, ex-prime minister Amama Mbabazi and Kizza Besigye, a leader of the Forum for Democratic Change (FDC) party, are both hoping to challenge veteran President Yoweri Museveni in elections next year.
Police spokesman Fred Enanga told the state-run New Vision newspaper that "the two politicians recorded statements and had since been released unconditionally" yesterday.
Police have made several warnings against holding public rallies without permission, with organisers required to submit details to the police at least three days before any meetings.
But Mbabazi, a former close ally of the president, announced last month he would challenge the 70-year-old incumbent for the nomination.
More From This Section
The move sparked criticism from the government, which pointed out that many of the failings of which Mbabazi accuses Museveni - such as corruption and a lack of jobs - happened when he was the party's secretary general.
Besigye is a three-time presidential election challenger and a former personal doctor to Museveni.