The dramatic story of the Gambia’s 2016 presidential election is finally coming to a close. After an ECOWAS military force led by Senegal entered the country on Thursday, Yahya Jammeh finally agreed to step down and go into exile. Now, Adama Barrow, the country’s new president, is ready to usher in a “new era of Gambia.” Barrow has promised to free political prisoners, cultivate an independent judiciary, rescind Jammeh’s decision to leave the ICC, and do away with the repression that characterized Jammeh’s rule. After 22 years of dictatorship, however, Gambian democracy is in many ways a blank slate. As a result, Barrow’s rise does not mark the end of a transition to democracy. Instead, it is only the beginning of the next challenge: building the necessary institutions for sustainable reform.

For anyone who isn’t yet caught up, the Gambia, a small country on the Northwest coast of Africa, has been in crisis since last month, when Yahya Jammeh lost the country’s presidential election after 22 years in power. Considering Jammeh’s repressive rule, the world was shocked when Adama Barrow, a newcomer to politics, triumphed in the election. The world was even more shocked when Jammeh conceded defeat the next day. A week later, however, Jammeh rescinded his concession and refused to cede power. Meanwhile, ECOWAS (the Economic Community of West African States) and the international community threw their support behind Barrow, Barrow was inaugurated in the Gambian embassy in Dakar, and ECOWAS prepared for a military intervention. Now that the intervention has occurred, Jammeh has finally stepped down and gone into exile.

The Gambia has now entered a phase that has, throughout recent African history, proven immeasurably crucial in determining future levels of prosperity: the post-strongman political transition. After the African continent was decolonized, its politics came to be defined by a long list of dictatorial strongmen who dominated narrow elites. These strongmen, who often co-opted the corrupt institutions established by their former colonial overlords, ensured that their countries remained steeped in poverty. When they fell, and they always did, the dearth of democratic institutions would facilitate the rise of a new strongman who similarly co-opted corrupt institutions. This pattern was seen when Kabila toppled Mobutu in the DRC, when Teodoro Obiang Nguema Mbasogo toppled his uncle in Equatorial Guinea, and in the Gambia itself after Jammeh overthrew Dawda Jawara. Clearly, establishing democracy after dictatorship doesn’t always work out as planned.

In some cases, however, countries have been able to escape the vicious cycle of corrupt strongmen. Many African countries that were once controlled by repressive dictators now have effective democracies. Ghana, for example, was once a one-party state run by Kwame Nkrumah and later a dictatorship under Jerry Rawlings, but Rawlings led a transition to democracy. Last month, the country completed yet another transition of power as one of Africa’s most stable democracies. While the Arab Spring launched Syria, Yemen, and Libya into civil wars, it launched Tunisia into democracy with the overthrow of its longtime strongman. The question, then, is this: will Barrow fulfill his promises to turn the Gambia into a democracy, or will it ultimately circle back towards autocracy?

The Gambia’s current situation poses a risk to democracy mainly because it does not have a stable, democratic foundation. In order for a democracy to succeed, the power of the executive must be limited, the people must be educated and engaged enough to exercise their vote responsibly, and government officials must commit to putting the interests of the people above their own interests. As of now, the government is structured around a strong executive, the people are ill-informed due to restrictions on freedom of information, and, according to the Freedom House, “official corruption remains a serious problem.” As a result, Barrow could easily assume dictatorial power if he wanted. But he has so far shown a commitment to building a democracy, promising to restore freedom of speech and do away with the culture of fear. While doing so will empower the people, it is not enough to guarantee success. Instead, fundamental cultural and institutional changes must be made within the government.

Even if Barrow has no interest in assuming autocratic power, both he and his successors will have the incentive and ability to do so unless there is serious institutional reform. It would not be surprising if a future leader of the Gambia takes advantage of Jammeh’s institutions to re-establish a dictatorship. As a result, Barrow’s primary challenge over the next few years is to build a political culture that makes this impossible, and that is an immense challenge. Today is certainly a triumphant day for the Gambia, but the rise of a democratically elected leader does not mean that long-term democracy is guaranteed. The sun has set on a brutal and oppressive era, but diligence is still needed to ensure that the sun never again rises on such an era.