OUAGADOUGOU, Burkina Faso — Military officers overthrew the government of Burkina Faso on Thursday, plunging the West African country into chaos and violence, while the leader of the country’s transitional parliament denounced the coup and declared himself the interim president. The coup was apparently led by allies of the country’s longtime ruler, who was toppled in October.

Gen. Gilbert Diendéré took control of the country, according to a military spokesman. General Diendéré is a close ally of the former president, Blaise Compaoré, who was in power for 27 years until last fall.

The crisis began Wednesday evening when members of the Presidential Security Regiment stormed a cabinet meeting and seized the interim president, Michel Kafando, and the prime minister, Isaac Zida, along with other officials. They also raided the newsroom of Radio Omega, a station that was central in reporting news of the 2014 uprising, forced the journalists to cut off the signal, and set their offices on fire.