It was a far longer and far bloodier struggle than many anticipated, but Libya has been declared liberated. The 42-year rule of Moammar Gadhafi has ended, and the north African nation can begin to rebuild itself. Libya is well positioned to move forward: With extensive oil reserves and proximity to Europe, the country has friends and ready partners.

The chief danger is the country’s lack of unity. Gadhafi believed in “divide and conquer,” and his tenure was marked by the support of regional and tribal rivalries. Libya must re-unite to succeed.

The Libyan revolution began earlier this year as domestic discontent was fanned by the Arab Spring. The overthrow of governments in Tunisia and Egypt left many thinking that Gadhafi’s time was limited. NATO’s March decision to impose a no-fly zone, which followed a United Nations Security Council vote and enjoyed the support of the Arab League, suggested that the Libyan leader’s time had run out.

He held on, mounting counteroffensives and, at times, looking like he would prevail. But the regime crumbled under sustained pressure, and Col. Gadhafi himself was caught and his final ignominious end was captured in a horrific video filmed on the battlefield of Sirte. Days later, the interim National Transitional Council (NTC) declared Libya liberated.

That was an extraordinary moment for generations of Libyans who had known only a brutally efficient and repressive police apparatus. Gadhafi had long dismissed democracy as a sham, preferring to believe that he knew what was best for his people.

The declaration also triggered a timetable that would yield an enduring government for the country. The NTC was an interim movement made up of activists and former government officials who had quit the regime. They pledged to resign upon liberation to let a new government oversee an eight-month transition plan.

The plan is moving forward with the selection of Mr. Abdurrahim el-Keib as the new prime minister. He is a U.S.-educated engineering professor with little political experience. He has two weeks to appoint a new interim government that will oversee the drafting of a new constitution and hold general elections within eight months. It is an ambitious agenda.

The war did significant damage. The interim government estimates that at least 30,000 Libyans (out of a population of 6 million) died during the revolution; another 50,000 are said to be wounded. Power in Libya was concentrated in the hands of Gadhafi, his family and allies. There are no real institutions of power, nor is there a civil society that can help pick up the slack.

The country does have oil. Production is reportedly exceeding 350,000 barrels a day and is set to rise to 1 million within a few months. Companies and governments are eager to help Tripoli tap those reserves and investment should be forthcoming. If managed properly, Libya’s future is bright.

The chief concern is national unity. The concentration of power in Gadhafi’s hands was complemented by a deliberate strategy of “divide and conquer.” He played up regional and tribal rivalries to ensure that no individual or group could challenge his authority. The unity of purpose that brought those competitors together has dissolved with Gadhafi’s death. Worse, the various groups are now heavily armed with the weapons used to take down the government or stolen in its dying days.

One of the most worrying divisions is that between Islamic and more secular Libyans. Shortly after Gadhafi was killed, the then NTC chief Mustafa Abdel Jalil declared that the new Libyan government would be based on Islamic law. That set off a mild furor among Westerners who feared that the Arab Spring, instead of ushering in a new age of democracy in the Middle East, would be exploited — as many feared — by Islamic militants. The victory of Islamic parties in the recent election in Tunisia confirmed that fear. Mr. el-Keib has responded by saying that the protection of human rights and democratic functions is his government’s top priority.

One way to accomplish that is to organize a security force and secure the vast quantities of weapons that have flooded the country. An entity must be created that has the power to enforce order and that operates according to the rule of law. Libyans must be reassured that they are safe and secure.

Critical to that task is an accounting of Gadhafi’s end. The videos of his death make it look like a summary execution. That must not be permitted. There can be no exceptions to the rule of law.

The liberation of Libya is a lesson for other governments as well. It is a well earned victory for European leaders who backed — with United Nations support — an indigenous rebel movement. NATO provided the cover as Libyans did the fighting. That is as it should be. The readiness of Western leaders to stick with their plan, even when it looked like the revolt might fail, is to be commended.

We should all support the new Libyan government, helping it to put down roots and to reverse effects of the Gadhafi legacy. Few countries are better posed to build a better future. Few peoples have so earned Western help.

In a time of both misinformation and too much information, quality journalism is more crucial than ever.
By subscribing, you can help us get the story right.