After months of calls for dialogue in Libya, China has waded into the diplomatic fray, but is courting both sides more to safeguard its interests than to bring an end to the conflict, analysts say.

Beijing’s warm welcome to Libya’s foreign minister this week and invitation for the opposition to visit China comes as the West throws its diplomatic and financial support behind the rebels looking to oust Moamer Kadhafi from power.

Chinese foreign ministry spokesman Hong Lei has said Beijing is “working along with the international community to resolve the Libyan crisis politically”, but analysts say that its involvement is pragmatic above all.

“What matters for China is not who is in power, but how its economic interests are served and its citizens protected,” Jonathan Holslag, a fellow at the Brussels Institute of Contemporary China Studies, told AFP.

“It reckons that new regimes in developing countries usually require more Chinese economic support and thus do not necessarily undermine its presence.”

In just the past week, Beijing has confirmed two meetings with Mustapha Abdul-Jalil, the leader of the opposition National Transitional Council (NTC) — one in Doha, and one in the eastern rebel-held Libyan city of Benghazi.

A Chinese foreign ministry official then said Thursday that Beijing was ready to receive NTC representatives “in the near future”.

Meanwhile, Libyan Foreign Minister Abdelati al-Obeidi spent three days in Beijing this week discussing ways to bring an end to the crisis, with Beijing insisting a ceasefire should be the “top priority” of both sides.

Holslag said Beijing has often “diversified its political relations” in unstable countries such as Sudan, Myanmar and Pakistan by meeting opposition groups so its economic interests can “better withstand political turmoil”.

China has significant commercial interests in Libya including oil, telecoms and rail projects, and was forced to evacuate more than 35,000 migrant workers from the north African state when unrest broke out in mid-February.

Until recently, Beijing had maintained its long-standing policy of non-interference and public neutrality since the start of the conflict in Libya, calling multiple times for a peaceful end to the popular uprising.

Although it allowed the UN Security Council to green-light international military action against Kadhafi’s regime by abstaining from the vote on the resolution, rather than using its veto, it has criticised NATO-led air strikes.

“After having without a doubt hoped for the failure of the (NATO-led) intervention, Beijing realised the situation had truly changed, and decided to preserve its interests and its implantation in the zone,” Paris-based China expert Valerie Niquet told AFP.

“In the short term, China has made contact with the opposition and will put its pieces on the chess board, economically and no doubt politically,” said Niquet, head of the Asia department at the Foundation for Strategic Research.

For Jean-Pierre Cabestan, a professor at Hong Kong Baptist University, although Beijing — unlike Washington and even Moscow — has yet to call for Kadhafi to step down, it is trying to “prepare for the future by getting closer to the rebels without backing the West’s position”.

In its unfamiliar role as mediator Beijing risked having no more than a limited impact on the conflict itself, he told AFP, but added: “China has a lot of interests in the Middle East and Africa.”

Cabestan explained that as Libya is “at the crossroads of these two regions”, Beijing has had to deal with Tripoli despite “a complicated relationship” with Kadhafi, who has not visited China for nearly 30 years.

China also needs to manage its crucial ties within both the African Union and the Arab League, in a political landscape that has been turned upside-down by a spate of popular uprisings that Beijing has watched with mounting concern.

“Beijing does not want to cut itself off from a base that allows it to build upon its international clout, especially in relation to the United States,” Niquet said.

Washington brushed aside China’s increased involvement, with US State Department spokesman Mark Toner saying: “There is a UN mediator on this issue. And we believe that should be the focus of efforts to mediate the conflict there.”