On June 4, 2009, President Barack Obama gave a historic speech in Cairo, directed towards the Muslim world at a time when difficult realities of the administration of the War on Terror strained many of America’s relationships with Middle Eastern countries and their populations.

When Obama spoke in Cairo of his commitment to governments that reflect the will of the people, administer justice equitably and do not steal from their countries, he addressed a North Africa replete with tyrants and repressed populations. But 28 months later, with the death of Col. Moammar Gadhafi, America has an opportunity — and a duty — to create a stable and democratic state.

There are doubtless going to be calls from across the American political spectrum to declare “mission accomplished” and withdraw or draw down the U.S. presence swiftly, regardless of NATO’s function going forward. While well-intentioned and understandable in light of the ongoing debt crisis and other standing commitments across the Middle East, this would be a mistake.

Libya is in shambles. It does not have a parliament, political parties or any semblance of civil society. Its infrastructure — or whatever existed of it before the civil wars — has been severely damaged. The country has no traditions of protecting free speech, religion or press. It has no institutions of press either, for that matter. The Libyan people do not understand how to hold governments accountable, because theirs has never been accountable in living memory.

Leaving them to deal with these things alone is a recipe for a failed state, and the consequences thereof are unacceptable. Behold the government of Somalia: powerless after a civil war, it was forced to helplessly watch the rise of Al-Shabab, a blight on the Horn of Africa and the world. If violence grips Libya and the Transitional National Council does not make a smooth shift into formal governance, a similar fate may await. The damage to regional stability would be severe, and this is not exactly a region that has become known for its political stability in recent months.

The consequences of a failed state may be even more dire in Libya’s case. In 2003, Gadhafi renounced Libya’s weapons of mass destruction program and dismantled existing progress on a nuclear facility. But in late August of this year, a former senior U.N. inspector warned that there was still unsecured material at the Tajoura nuclear research center near Tripoli. The International Atomic Energy Agency had confiscated nuclear weapon design information years ago, but there are apparently still radioisotopes, radioactive wastes and low-enriched uranium fuel there. Additionally, as of February, only about half of Libyan mustard gas stockpiles had been confiscated. There are international impacts in play here.

I am well aware that, to many, these arguments sound like shadows of the American experiment in Iraq. But that situation was different, and we should not take away the wrong lessons from our failures there, as so many in America have done. It is not time to retreat into our shell and surrender the world to the Chinese century. Nation-building and stabilization operations are only going to become more frequent and important in the coming years, not less.

We did not invade this country and we are not dealing with an insurgency. We allowed the Libyans to play a leading role in their own liberation while still supporting them both in spirit and with material assistance. And most of all, we have the weight of Iraq heavily on our minds, guiding our every move in Libya. We will not make the same mistakes.

I am not arguing for military occupation. I am arguing for sustained civil support and the inclusion of experts in the fields of police training, courts and legislatures, industrialization, infrastructure and more. They should be there to advise, not to make demands.

If we work together with the new Libyan government and play our cards right over the next few years, we can send a strong message to other authoritarian regimes in the region, from Syria to Iran. This is not something to leave to the Europeans (even if they are interested), and it is certainly not something to leave to chance. Our principles and our national security demand commitment.

Michael Magdzik is a junior in Berkeley College. Contact him at michael.magdzik@yale.edu.