With Libyan rebels storming the city of Tripoli and the Qaddafi regime almost certain to fall, conversation has turned quickly to the question of what sort of government is likely to spring up in its stead. As our experience watching governments in East-Central Europe and the former Soviet Union transition from communism (both to democracy and autocracy) should tell us, the range of possible outcomes for the country is neither uniform nor inevitable. Indeed, the chances that Libya will make a successful democratic transition depend upon a number of discrete variables. Here are three that I think to be among the most important.

1. Outsiders versus Insiders. How much influence will members of the “Old Regime” be allowed to wield in the new Libya? This question pertains to both economic and political actors. In both cases, there is a very delicate trade-off (expounded upon expertly by John Gould in his new book, The Politics of Privatization) that needs to be negotiated. On the one hand, there will be demands for justice against those who helped maintain Qaddafi in power (and, in many cases, benefitted financially from doing so) for four plus decades, as well as a sincere concern that if the same people remain in power and in control of the economy after the transition, it will undermine Libyans’ faith in democracy and increase the appeal of non-democratic actors. On the other hand, incorporating at least some members of the “Old Regime” into a post-Qaddafi Libya offers the tantalizing appeal of a smoother transition, both due to the real knowledge and insight these actors have about how to run a state and the fact that this will decrease the pool of potential pro-Qaddafi insurgents who could seek to violently disrupt the new regime.

A particularly important question, in this regards, is what happens to members of Qaddafi’s security forces, with Iraq offering lessons about the dangers of simply sending soldiers from the old regime on their way. To be clear, there is not a correct answer to this trade-off, but how Libya negotiates it will likely have a major impact on how the country develops down the line.

2. The Immediate Security Situation. This is more of a lesson from Iraq than from the post-communist world, but we now know that the consequences of chaos from a security standpoint can be long-lasting. The received wisdom on Libya is that Qaddafi largely destroyed all elements of civil society. Combined with a high degree of uncertainty about what is happening to armaments collected by the Qaddafi regime (see here, here, and here), the possibility for rampant violence is real. One of the stories commonly told about the Balkan conflicts, meanwhile, is that communism helped suppress some long-standing conflicts between Bosnians, Croats, and Serbs, and the collapse of communism eventually allowed these grievances to be aired and to turn violent. While there has been a great deal of pushback against this academic theory, there is no reason to be complacent and simply assume there are not scores to settle in Libya after four decades of authoritarian rule. Either way, it is difficult to imagine a scenario where a successful democratic transition is made more likely by sustained inter-ethnic violence like we’ve seen in Iraq and Afghanistan.

3. Election Rules Matter. At some point in the near future, some group of people in Libya will gather to determine a set of rules for elections. While, again, there is no silver bullet for the perfect set of electoral rules, the point is that these rules will have very serious consequences. Moreover, if patterns from Central Europe are repeated, important political actors will be aware of these consequences and will try to shape these rules in their interest. For example, parties with more support will try to craft rules that make it more difficult for small parties to enter the parliament. Similarly, parties with a popular leader may push for an early, single-round presidential election to prevent the leaders of other parties from having time to become better known. Indeed, for all the discussion of which electoral rules are “better” for democracy in some abstract sense, Ken Benoit and his co-authors have shown that, even at the very early stages, it’s often just raw politics that dictate the positions of the relevant actors—each of whom tend to push for the form of electoral democracy they think will help them the most. (For more on the ability of interested actors to influence the crafting of electoral rules in the post-communist cases, see these insightful articles by Ken Benoit and Jacqueline Hayden and Benoit and John W. Schiemann.)

Bottom line: The crafting of electoral laws can turn out to be just as political as the elections that follow. In many ways, this will be the first real “democratic political challenge” faced by the new Libya: trying to avoid letting the crafting of electoral rules get hijacked by the interests of the few at the expense of what is best for the many.

At this point, all signs point to the West and NATO trying to step back quickly from involvement in Libya, and the lessons of Iraq and Afghanistan may suggest that this is a good move. However, to the extent that there is still the opportunity for Western countries to exert some influence over developments in Libya—and one has to assume there will continue to be contacts between the NATO powers and the new Libya regime—they would do well to keep a close eye over these three areas.

Joshua Tucker is a Professor of Politics at New York University, a National Security Fellow at the Truman National Security Project, and a co-author of the award winning politics and policy blog The Monkey Cage, where a version of this article is cross-posted.