Brandishing guns and tossing bombs, the mob surrounded the construction site, attacked the foreign workers and tried to make off with everything from cars and computers to cash.
The country was falling apart, and the assault was "very scary," says one victim, an interpreter who managed to escape the onslaught and find refuge in the home of a local friend.
Four days later, her embassy called and, before long, she was at the airport walking past thousands of others desperate, but unable, to get out.
Monica Li had no such worries. She was Chinese. "There were many people from other countries ... but no one picked them up," she recalls.
Ms. Li flew directly to Beijing, while others were evacuated on Greek ferries hired by her government. In total, 35,860 Chinese nationals were plucked from danger in just under a week as Libya imploded in 2011. China also carried to safety nearly a thousand others, including citizens of Bangladesh, Nepal and Vietnam.
"The Chinese government is getting stronger and stronger," Ms. Li says. "In the past, they may not have been able to do something like this. But now they can protect their people. We just feel very lucky."
Three years later, in the throes of another crisis, Beijing is once again exercising its might. Two-thirds of the 239 people who were on board when Malaysia Airlines Flight 370 disappeared March 8 were Chinese, and their government has responded with force, committing almost a dozen aircraft, two dozen satellites and a small fleet of ships to the international effort to find the plane.
Although China has long embraced the world's money, it has been much criticized for doing little to redress a long history of insularity on other fronts. It has been called a "selfish power" that has won international treaties and assistance but been unwilling to offer much in return.
In the search for the missing airplane, however, a new look is emerging, that of a country more interested in the broader good. That the steps taken so far have been small does not diminish their significance.
"There is a growing pattern of China co-operating in disaster relief and search and rescue," says Geoff Raby, a former Australian ambassador to China, of what he considers "building blocks" for something more important.
It is "part of China normalizing the way it deals with the rest of the world, as indeed it must," he says, noting that over time such efforts "begin to change people's perceptions."
For example, as Chinese ships and planes hunt for Flight 370 alongside those of other nations in the southern Indian Ocean, search leader Australia has gone out of its way to take note. Its authorities have said they are "very satisfied" with Beijing's willingness to co-operate and share information. One Australian naval officer, describing communication with a Chinese ship, said it was "like she was one of our own."
Generosity that extends even to a bitter rival
The change began long before the plane vanished. China was among the five most generous donors to Japan, arguably its most bitter rival, following the 2011 tsunami and subsequent Fukushima disaster. Its ships patrol the Somali coast in the fight against piracy. A Chinese warship recently helped to escort a shipment of chemical weapons being removed from Syria and, in January, one of its icebreakers played an important role in rescuing people from an icebound Russian ship off Antarctica.
China also plays an increasingly important role at the United Nations. It currently serves in no fewer than 10 peacekeeping missions with 2,188 active peacekeepers, more than any other permanent member of the Security Council and exceeding those from Canada and the U.S. by a factor of 18.
As well, China contributes more than five per cent of UN funding, compared with less than 3 per cent for Canada. Its navy and army have conducted joint disaster-response exercises with Australia and New Zealand, and at least one live-fire naval exercise. Last November, for the first time, members the People's Liberation Army set foot on U.S. soil – while taking part in a disaster-relief exercise in Hawaii.
"China has very gradually, over the years, broken with what had been the 1970s policy of non-participation and being studiously 'outside,'" says U.S. analyst Jeffrey Laurenti, a long-time student of the UN. It has begun to act more like "a responsible global citizen," by taking steps that "build up its credibility and its experience as a major power."
In part, that's because China has invested heavily in a navy and air force that can, with increasing ease, project power around the world. It now has a capability to respond that it never before possessed.
In his 2013 book, China Goes Global: The Partial Power, political scientist David Shambaugh says that, as a rule, Beijing's increasing influence is more broad than deep, and has left it notably devoid of close international friends.
But he makes an exception for disaster relief, calling it "one area where China has progressively been doing a better job of being a good global citizen."
In part, the country has no choice. Its ties with the international community have grown dramatically in recent years. No other country sends out more tourists – about 97 million last year – and Chinese companies have become a global force, making foreign investments in 2012 of $87.8-billion, behind only those of the U.S. and Japan. They now do business everywhere from African war zones and eastern Europe (Chinese-built Geely cars are top sellers in Ukraine) to Alberta's oil sands.
The world has increasingly intruded on the home front as well. A deadly attack at a train station last month by knife-wielding assailants with apparent fundamentalist Muslim ties made clear that global problems are increasingly China's problems.
In that respect, China sees its efforts at the UN as a "very useful" contribution "for the maintaining of international order," says Wang Chungui, former ambassador to Malaysia, calling China a "responsible country in this world."
Yet critics say its diplomacy remains heavily tainted by narcissism. For all its willingness to work with others, China remains focused on its own interests. The Libya evacuation and Flight 370 search both have distinctly domestic political motivations.
"The Chinese leadership must be seen as doing everything possible to find out what happened to this airliner," says Bonnie Glaser, senior Asia adviser at the Center for Strategic and International Studies in Washington, D.C. "This for China becomes a legitimacy issue for the party and the leadership."
Ms. Glaser calls China "very much a selfish power," and argues that Beijing hasn't moved far from the foreign policy dictates of Deng Xiaoping, who famously urged his country to "keep a low profile and never take the lead."
She insists that "Chinese ambitions outside their own borders are very limited," adding that "they want to ensure that their external environment continues to be favourable for internal stability and domestic growth."
Even in supposedly co-operative ventures, China has acted as a lone wolf. With the airline search, Malaysia and Australia have co-ordinated international efforts, but Beijing unilaterally reported satellite debris sightings and the detection of an underwater audio "ping" by one of its ships.
China "has consistently failed what I call 'kindergarten 101'; that is, share the sand-box with others and co-operate on the sand castle," says Larry Wortzel, a former U.S. military attache in Beijing now serving on the U.S.-China Economic and Security Review Commission.
China has been noticeably absent from global conventions on land mines and the International Criminal Court, and has been loath to turn to international dispute resolution to sort out territorial issues.
By other measures of engagement, too, China lags far behind. It spent $39-billion (U.S.) on international aid in the half-century leading up to 2009, little more than the $31.5-billion the U.S. donated last year alone (Canada's figure was just under $5-billion).
Following the 2004 tsunami in the Indian Ocean – a disaster in its own backyard – China provided just $122-million in assistance, compared with $445-million from faraway Canada. Last year, after Typhoon Haiyan struck the Philippines, China initially offered $100,000, a sum so embarrassing that it was soon increased.
'When you are a superpower … responsibilities come with that'
China, of course, remains a developing country, with nearly 100 million people still living below the poverty line and a per capita gross national income lower than that of Thailand, one of the countries hardest hit by the tsunami 10 years ago.
At the same time, its economy is now the second largest on Earth, and in time may exceed that of the U.S. For many, it remains too reticent to employ its power in service of the greater global good.
"Everyone keeps telling them that they have to be more of an international player," says Guy Saint-Jacques, Canada's ambassador to China, adding that he hopes the collaboration on Flight 370 is a sign of a broader shift.
"When you are a superpower, and especially a permanent member of the Security Council, I think responsibilities come with that," he says. "You cannot sit on the sidelines, or get involved only because your interests are at stake."
Nathan VanderKlippe is The Globe and Mail's Asia correspondent, based in Beijing.