CAIRO (AP) — The top leader of Egypt's Muslim Brotherhood, released from detention, is delivering a speech at the main rally in support of the ousted president, vowing to "gain our rights."

Mohammed Badie, the Brotherhood's general guide, had been taken into custody by security forces soon after the military ousted President Mohammed Morsi, who hails from the Brotherhood.

Moments before Badie appeared on stage Friday, the Brotherhood's political party said in a Facebook post that he had been released from custody.

"Free revolutionaries, we will continue the path," he led the crowd of tens of thousands in a chant.