The longest underwater pipeline in the Mediterranean runs from the coast of Libya to the Italian island of Sicily. Inaugurated in 2004 by Libyan dictator Muammar Gaddafi and Italian Prime Minister Silvio Berlusconi, the 323 miles (520 km) pipeline and its northward flow of gas might as well be a symbol of the relationship between the two countries.

Of all the mutual back-scratching among Europe's rich democracies and North Africa's strongmen, Italy's dependency on Gaddafi stands apart. Libya is Italy's largest supplier of oil, providing for roughly a third of the country's energy consumption. The dictator's government owns a substantial share of the Milan stock market, including 7.5% of Unicredit, Italy's largest bank; 2% of the Italian oil company ENI; 2% of the country's second largest industrial group, Finmeccanica; and 7% of the Turin-based Juventus soccer club. Libya also provides a critical market for its northern neighbor's struggling construction firms. And, since 2008, when Italy agreed to invest $5 billion in Libya, Gaddafi has kept a tight grip on the attempts by his citizens and other African migrants to take ships northward on the Mediterranean.

So on Tuesday, when the Italian oil company ENI announced that it was shutting the pipeline down, many saw the move as the potential start of a great unraveling. "It's definitely a disaster for Italy," says Arturo Varvelli, a Middle East expert at Milan's Institute for the Study of International Politics and the author of Italy and the Rise of Gaddafi. Unlike, say, Egypt and Tunisia, Libya doesn't have a developed middle class that could conceivably take the reins of power. Nor does it have a robustly independent military that could oversee a transition. The desert country's citizens are generally poor, with strong clan ties and with little exposure to the outside world. "We have no idea what could come out of this crisis," says Varvelli. (See why Silvio Berlusconi will probably avoid jail time over his sex scandal.)

The two countries  which are geographically close and connected by a history of colonialism, with complementary economies  have long had tight ties. But under Berlusconi, the relationship reached new levels of chumminess. Whenever Gaddafi visited Italy, he was paraded as a guest of honor. In 2009 he was given a seat at the table during the G-8 summit in Italy. At one point, Berlusconi was even filmed kissing the dictator's hand.

If the gesture seemed unduly subservient, it wasn't altogether unrepresentative of the relations the two countries had forged. One nation may have been a founder of modern Europe and the other a lightly populated country bordering the Sahara, but somehow Libya seemed to be holding all the cards. "Libya's being a police state has definitely given it an extra source of power," says Emanuela Paoletti, a researcher at the International Migration Institute at Oxford. "Unlike a liberal democracy, it doesn't have to cater to public opinion." Italian fears of immigration, Libya's deep and pure petroleum reserves, and Gaddafi's ability to fling money around all meant that Rome was often the one that found itself on its knees. "The standard view of developing countries being weak and passive and the developed countries as the ones setting the rules of the game can be quite misleading," says Paoletti.

Today the Italian approach seems to have backfired. Libya risks sliding into civil war and anarchy. Hundreds of Libyans have lost their lives. Italian citizens are being evacuated. Europe is bracing itself for a new round of immigration. And investors have been racing to sell off shares of companies like ENI, which are strongly invested in Gaddafi's Libya.

Democratic states might sometimes be messier to deal with than dictatorships. But as the events are showing, strongman regimes  while stable in the short term  can be subject to dramatic collapse. "If Gaddafi's regime topples, if we are going to see a new face in Libya, then all of Berlusconi's efforts will go down the drain," says Claudia Gazzini, a fellow at the European University Institute in Florence. And a Gaddafi replacement would be unlikely to appreciate Berlusconi's lavish attentions to his predecessor. "One thing is: 'I may not like Gaddafi, but I have to deal with him,' " says Karim Mezran, an expert on North Africa and the Middle East at Rome's Center for American Studies. "Another is: 'Gaddafi is my best friend.' The risk is that somebody comes to power and says, 'When we were oppressed, you were kissing his hand. Now screw you.' " (See Silvio Berlusconi and the politics of sex.)

The biggest tragedy of the situation in Libya may be that Italy had an opportunity to push for democratic reforms and improvements in human rights, even as it was exploring commercial relations with the country. That, says Natalino Ronzitti, a professor of international law at Rome's LUISS University, might have smoothed the inevitable transition when the dictator's rule, which has lasted 41 years, came to an end. Instead, Italy chose to do nothing. "That was a mistake," says Ronzitti. "It was a mistake that wasn't made just by Italy but by all the Western countries that found it convenient to deal with regimes like this one."