Members of Burkina Faso's military said today they had stripped interim President Michel Kafando of his functions and dissolved the government, seizing power in a coup less than a month before elections meant to restore democracy in the West African country.

The leaders have also named Gilbert Diendere, a general in the elite presidential guard, to head a transitional council, the soldiers said in a statement broadcast on state-run television on Thursday, which also announced the closure of the nation's land and air borders, as well as the implementation of an overnight curfew.

Burkina Faso was plunged into chaos on Wednesday when the elite Republican Guard — a pillar of long-time former President Blaise Compaore's regime — seized Kafando, Prime Minister Yacouba Isaac Zida, and two ministers.

On Thursday, soldiers fired warning shots to disperse a crowd of more than 100 people gathered in the central Independence Square to protest against the presidential guard. Sporadic gunfire continued to ring out from other areas of the capital early on Thursday morning.

Hundreds of people had taken to the streets of Ouagadougou late on Wednesday to protest against the seizure of Kafando and the prime minister.

Meanwhile, the head of Burkina Faso's transitional parliament called on the armed forces to step in and halt a coup by "a small group" of military officials, and said he would assume leadership until the president was released.

"The transition was put in place by the will of the people, who fixed its duration and its mission... It is not a small group which is going to change that," Moumina Cheriff Sy told Reuters. "In the absence of President Kafando, I assume the leadership of the transition."

The powerful presidential guard has repeatedly got involved in politics since Compaore was toppled in a popular uprising in October last year.

"The patriotic forces, grouped together in the National Council for Democracy, have decided today to put an end to the deviant transitional regime," the military official said on RTB state television.

"The transition has progressively distanced itself from the objectives of refounding our democracy," he said, adding that a revision of the electoral law that blocked supporters of Compaore from running in the planned October 11 had "created divisions and frustrations amongst the people."

Follow VICE News on Twitter: @vicenews