THE INITIAL EUPHORIA in Tripoli and Benghazi represents the beginning of a chapter for Libya, and many dangers lie ahead. But before focusing on those, it’s worth reflecting on what has been achieved.

“I know there has been controversy about the promotion of democracy in recent years, and much of this controversy is connected to the war in Iraq,” President Obama said in his Cairo speech two years ago. “So let me be clear: No system of government can or should be imposed upon one nation by any other. ”

That was true, but it missed a key point. We’ve seen across the Middle East, as in the rest of the world, that freedom isn’t something that gets “imposed.” It is pretty much universally desired; just look at the rejoicing in Tripoli as the mantle of fear lifts. The right question for the United States and its allies isn’t whether to help oppressed people fight for freedom, it’s when. The answer will depend on the chances of success, costs of intervention and potential benefits.

The imminent collapse after 42 years of Moammar Gaddafi’s brutal and capricious regime demonstrates that even a half-hearted U.S. effort can make a big difference. Mr. Obama insisted six months ago that U.S. participation would last only “days”; he kept the connection between military means and political goals murky; he fudged rather than comply with the War Powers Resolution; he was slow to recognize the Libyan opposition.

But as British Prime Minister David Cameron and French President Nicolas Sarkozy led, Mr. Obama crucially maintained enough U.S. support to keep the NATO mission going. Libyans themselves provided the motivation and the manpower, but they could not have succeeded without U.S. help. And Mr. Obama sustained the mission despite criticism from both Democrats and potential 2012 opponents.

Rep. Michele Bachmann (R-Minn.), for example, said during a Republican presidential debate in New Hampshire that Mr. Obama “was absolutely wrong in his decision on Libya.” “First of all, we were not attacked,” she said. “We were not threatened with attack. There was no vital national interest.”

It may be right that Libya is not a “vital national interest”; the United States managed to live with a Gaddafi dictatorship for a long time. But look at the benefits if Libya begins to move toward democracy. The momentum will help democrats in Tunisia and Egypt who are trying to shape their post-dictatorship worlds. It further isolates Syria’s holdout strongman, Bashar al-Assad. It means young Libyans may be able to envision a healthy future for themselves instead of joining terrorist groups out of frustration and anger.

There are huge if’s, of course. Libya has no tradition of self-rule and little civil society after four decades of repression. Risks include reprisal killings, internecine power battles, tribal rivalries and counterrevolution.

But there’s also something that wouldn’t have existed without U.S. help: a chance of success. The Libyan resistance has been preparing for six months to assume power. The United States has access to and credibility with the incoming regime — another benefit of its military support.

This remains, as it has always been, a Libyan struggle. But the United States can offer economic and political support. The key, as fighting ends, is to double down on U.S. commitment to a successful transition to peaceful, civilian rule. Such an outcome would certainly be in the U.S. interest.