Tens of thousands of protesters streamed across a Nile bridge towards Cairo's Tahrir Square to threaten a showdown after the leader of the Muslim Brotherhood spoke before a cheering crowd of supporters.

He vowed to reinstate ousted President Mohammed Mursi and end military rule.

General Guide Mohammed Badie's fiery speech, with a military helicopter hovering overhead, came soon after army troops fired on a pro-Mursi rally and one protester was killed.

The dramatic appearance by Mr Badie on stage before tens of thousands of supporters was his first in public since the president was jailed.

It injected a further vehemence into the campaign by Mr Mursi's largely Islamist supporters, who have denounced the military's removal of Egypt's first freely elected president as a coup they will not allow to stand.

Mr Mursi "is my president and your president and the president of all Egyptians," Mr Badie proclaimed. "God make Mursi victorious and bring him back to the palace," he said in the speech, which was partially aired on state TV. "We are his soldiers. We defend him with our lives."

Mr Badie, a figure revered among the Brotherhood's followers, addressed the military, demanding it abides by its pledge of loyalty to the president, calling it a matter of the armed forces' honour.

He said: "Your leader is Mursi, Return to the people of Egypt. Your bullets are not to be fired on your sons and your own people, you are dearer than that."

Mr Badie's speech appeared aimed at not only firing up his supporters, but also at trying to win support within the military against army chief General Abdul Fattah al Sissi, the defence minister who announced the president's removal on Wednesday night.

A Health Ministry official later said six people had been killed in clashes around the country involving opponents and backers of Mr Mursi, as well as security forces. Four people have been killed in Cairo and two elsewhere, with 180 wounded.

Security officials had reported that Mr Badie was taken into custody soon after the military removed Mr Mursi on Wednesday. Just before Mr Badie's appearance, the Brotherhood's political party said on its webpage he had been released. But on stage, Mr Badie denied he was ever arrested. There was no immediate explanation by security officials.

Soon after the speech, Brotherhood backers streamed across a bridge over the Nile towards the state TV building and Tahrir Square, where hundreds of thousands celebrating Mr Mursi's fall were massed. There was some stone-throwing between the two sides.

Mr Badie's appearance came after the military opened fire on pro-Mursi protesters marching on the Republican Guard headquarters in Cairo. The shooting threatened to further escalate Egypt's confrontation by increasing Islamists' fury. There are fears of an Islamist backlash, and before dawn gunmen in the Sinai attacked military facilities, killing one soldier.

The army shooting came when protesters marched on the Republican Guard building, where Mr Mursi was staying when he was ousted.

The crowd approached a barbed-wire barrier where troops were standing guard around the building. The soldiers opened fire and several protesters fell to the ground.

In Cairo, tens of thousands of Mursi supporters filled much of a boulevard outside a mosque several blocks away from the Republican Guard headquarters, vowing to remain in place until Mr Mursi is restored.

The protesters railed against what they called the return of the regime of autocrat Hosni Mubarak, who was ousted in early 2011. "The old regime has come back, worse than before," said Ismail Abdel Mohsen, an 18-year-old student among the crowds outside the Rabia al Adawiya Mosque. He dismissed the new interim head of state, senior judge Adly Mansour, as "the military puppet".

"After sunset, President Mursi will be back in the palace," they chanted. "The people want God's law. Islamic, Islamic, whether the army likes it or not."