Cheers broke out in the National Assembly building here on Monday as representatives chose the mayor of this beleaguered capital to serve as the interim president of the Central African Republic, a country in the grip of a sectarian civil war.

Catherine Samba-Panza, 58, will be the first woman to lead the nation, and she will probably serve for a little over a year, with the goal of leading it to national elections. Her appointment came from an unusual assortment of unelected rebel sympathizers, politicians, artists and others who have filled in as a substitute parliament for a nation so fractured that it has suffered a total breakdown of the state in recent months.

Now, hopes are high here that she can halt this impoverished nation’s precipitous “free fall,” as the United Nations secretary general, Ban Ki-moon, put it in a statement on Monday.