Burkina Faso junta frees interim president arrested during coup to overthrow his government

People protesting against the recent coup in the street as they walk among the burnt remains of tires in the city of Ouagadougou, Burkina Faso, Thursday, Sept. 17, 2015. While gunfire rang out in the streets, Burkina Faso’s military took to the airwaves Thursday to declare it now controls the West African country, confirming that a coup had taken place just weeks before elections. (AP Photo/Theo Renaut) (The Associated Press)

Smoke rises as Burkina Faso troops, in back, clear debris from a road as people protest in the area against the recent coup in the city of Ouagadougou, Burkina Faso, Friday, Sept. 18, 2015. Burkina Faso's military on Friday released the country's interim president who was detained during a coup that dissolved his government. The prime minister remained under house arrest. (AP Photo/Theo Renaut) (The Associated Press)

Burkina Faso Gen. Gilbert Diendere, center, walks alongside Senegal President Macky Sall, right, after he arrived at the airport for talks in Ouagadougou, Burkina Faso, Friday, Sept. 18, 2015. Gen. Gilbert Diendere — a former top aide to Compaore who was named on Thursday as the country's military leader — says he already has met with some members of the international community to establish dialogue and to seek a long-term solution. (AP Photo/Theo Renaut) (The Associated Press)

Burkina Faso's military has released the country's interim president after he was detained during a coup that dissolved his government.

The junta released a statement Friday saying that Michel Kafando was freed from military custody. The move comes after international condemnation and demands for his release.

Kafando, a former U.N. ambassador, had been chosen as an interim civilian leader after longtime President Blaise Compaore was ousted in a popular uprising last October.

His government had organized national elections for Oct. 11 but members of the military loyal to Compaore took power and arrested Kafando on Wednesday. The interim prime minister was also detained and remains under house arrest.

The junta later announced that a military general loyal to Compaore is now in charge.