The army takeover in Burkina Faso after President Blaise Compaore's resignation has prompted protests in the capital and international condemnation.

Thousands of people gathered in a square in the centre of Ouagadougou on Sunday to denounce the army's power grab.

Gunfire was also heard at the state television headquarters in the capital, according to a report from the Reuters news agency. The shots were fired into the air as Sara Sereme, the leader of opposition party PDC, arrived in the area with a throng of supporters.

Compaore's 27 years in charge of the landlocked West African country ended on Friday following two days of violent protests against his bid to change the constitution to extend his rule.

A power struggle ensued and on Saturday Presidential Guard commander Lieutenant Colonel Isaac Zida was appointed as transitional leader, trumping a claim by the chief of staff.

The victory of the popular uprising - and consequently the management of the transition - belongs to the people and should not in any way be confiscated by the army

Statement by coalition of opposition parties

A UN official on Sunday joined the United States and the African Union in rejecting the army's seizure of power but expressed cautious optimism about a return to civilian rule.

"We are hoping for a transition led by civilians in line with the constitution," Mohammed Ibn Chambas, head of the United Nations Office for West Africa, said.

"He [Zida] said he will reflect and try to work with the UN, African Union and the Economic Community of West African States and to find an acceptable agreement which conforms to the constitution," he said.

Under Burkina Faso's constitution, the head of the National Assembly should take office if the president resigns.

In a statement issued by military leaders after meeting to appoint Zida to power, they said the form and duration of the transition would be decided in consultation with all sections of society.

'Victory belongs to people'

A coalition of opposition parties and civil society groups met late on Saturday and issued a statement in which they described the army takeover as a confiscation of people's victory.

"The victory of the popular uprising - and consequently the management of the transition - belongs to the people and should not in any way be confiscated by the army," the coalition of opposition parties and civil society groups said in the statement.

"Our consultation reaffirmed that this transition should be democratic and civilian in character," it said, announcing a demonstration in the vast Place de la Nation for Sunday morning.

Burkina Faso: Uprising or military coup?

Political analyst Emna-Zina Thabet, who spoke to Al Jazeera from Ouagadougo, said despite the "tension and fear" gripping the country, there was also a sense of anticipation.

"All the Burkina Faso citizens are trying to negotiate together, with the civil society, with the army leaders and the opposition leaders, together, to prepare the future towards democratic elections," Thabet said.

The African Union called for the military to hand over power to civilian authorities. It said the Peace and Security Council - the arm of the 54-nation bloc that imposes sanctions for violations of democratic process - would discuss the situation on Monday.

"The Chairperson of the [African Union] Commission ... stresses the duty and obligation of the defence and security forces to place themselves at the disposal of the civilian authorities who should lead the transition," read the statement.

The US State Department called on a transfer to civilian authorities "immediately".

At least three people were killed in this week's protests during which the parliament building was stormed and set on fire.

Source: Al Jazeera and agencies