We and the E.U. together have got to think about how to create safe places in Libya and Syria to stem the refugee tide before it breaks the E.U. History will not be kind to Obama if he just turns away.

At the same time, Obama has an opportunity that no U.S. president ever had before. Two fledgling democracies have emerged in the Middle East — on their own. One is in Tunisia, whose civil society leaders won the Nobel Peace Prize, after writing the most democratic constitution ever in the region. But today guns, refugees and Islamist terrorists coming from Libya, which we recklessly uncorked, are helping destabilize the Tunisian experiment.

The West should be all over Tunisia with economic, technical and military assistance. “Tunisia is a start-up democracy,” its former Prime Minister Mehdi Jomaa told me. “It may be small, but its leverage for the future of the region is enormous. I can’t imagine any stability in the region if Tunisia doesn’t succeed.”

The other self-ignited democracy experiment is Iraqi Kurdistan, where the Kurds on their own built an American-style university in Sulaimaniya, because they want to emulate our liberal arts, and just opened a second American University, in Dohuk. But tiny Kurdistan today is hosting 1.8 million refugees from other parts of Iraq and from Syria, and with low oil prices, it’s almost bankrupt.

The Kurdish government, which was allowing a strong opposition party to emerge and a free press, is now backtracking, with its president, Massoud Barzani, refusing to cede power at the end of his term, and the stench of corruption is everywhere. The Kurdish democratic experiment is hanging by a thread. More U.S. aid conditioned on Kurdistan’s getting back on the democracy track would go a long way.

“It is one big game of survivor out here,” said Dlawer Ala’Aldeen, president of the Middle East Research Institute in Kurdistan. “America needs to constructively engage the Kurds, offer them conditional help and make them the partner that America deserves. Here, everyone listens to and likes America. [The Kurdish] people want America to protect them from Iran and Turkey.”

Kurdistan and Tunisia are just what we dreamed of: self-generated democracies that could be a model for others in the region to follow. But they need help. Unfortunately, Obama seems so obsessed with not being George W. Bush in the Middle East that he has stopped thinking about how to be Barack Obama here — how to leave a unique legacy and secure a foothold for democracy … without invading.