The details of the potential compromise — which was arranged by leaders of the Economic Community of West African States, known as Ecowas, and was to be overseen by Naba Baongo II, the leader of the Mossi, Burkina Faso’s largest ethnic group — were far from clear, however.

The leader of the coup, Gen. Gilbert Diendéré, who has defied calls for his surrender, was at the airport here to greet the West African leaders — including President John Dramani Mahama of Ghana, President Mahamadou Issoufou of Niger and Vice President Yemi Osinbajo of Nigeria — as they arrived. The general did not, however, join them and a United Nations representative, the Ghanaian diplomat Mohamed Ibn Chambas, at a later ceremony where Mr. Kafando was formally reinstated.

For now, a standoff between the Presidential Security Regiment, an elite unit founded by Mr. Compaoré and led by General Diendéré, and the armed forces appears to have eased, reducing the threat of further violence. Under the new truce, the military agreed to withdraw about 30 miles from the capital, while the regiment pledged to return to its base and to provide an inventory of its weapons within 72 hours.

French diplomats, who had sheltered Mr. Kafando after the coup and urged their citizens to remain indoors, noted an “improvement in the security situation.”

However, two serious questions remained unanswered. One was whether the coup’s leaders, including General Diendéré, would be given immunity from prosecution over the violence of the past week. The other was whether associates of Mr. Compaoré, including General Diendéré’s wife, Fatou, and two prominent politicians, Achille Tapsoba and Eddie Komboïgo, would be allowed to take part in new elections.