By Michael Bristow
BBC News, Beijing
China has worked hard over the past few months to show it is doing all it can to resolve the humanitarian crisis in Sudan's Darfur region.
More than two million have been displaced from Darfur
It has appointed a special envoy, sent peacekeeping troops to the region and embarked on a publicity campaign to persuade others it is being responsible.
This was done in part to prevent anyone linking China's close relationship with Sudan to the Olympics Games.
But for Steven Spielberg it was still not enough.
His decision to withdraw as artistic adviser to the Games' opening and closing ceremonies will be seen as a huge blow.
Beijing and Khartoum have long had strong political, economic and military ties.
China imports two-thirds of Sudanese oil - estimated at 500,000 barrels a day.
Last year, it imported a total of $4.1bn ($2.0bn) worth of goods from Sudan, mostly oil.
China is thought to be Sudan's biggest arms supplier
China is also believed to be Sudan's biggest arms supplier.
Because of this strong relationship, Chinese leaders have traditionally resisted international pressure to use their clout to bring peace to Darfur, where there is conflict between government-back militias and rebels.
Beijing has even used its veto at the UN Security Council - to block moves to impose sanctions on Sudan if it fails to stop the fighting in the troubled region.
China's stock response to outside criticism about its Darfur policy always used to be that other countries should not involve themselves in Chinese affairs.
But last year Beijing made a slight adjustment to that policy, appointing an envoy to Darfur, Liu Guijin.
He is an experienced diplomat who knows Africa well, having served as ambassador to both Zimbabwe and South Africa.
China also agreed to send in peacekeepers to the region as part of a UN force.
A total of 135 soldiers, who will not be engaged in frontline duties, have already arrived in Darfur.
China did this after more than 100 US legislators signed a letter last year calling on Beijing to take immediate action to stop the violence in Darfur, which the UN says has left more than 200,000 people dead since 2003.
The London-based human rights organisation, Amnesty International, also claimed that China was selling weapons to Sudan in violation of a UN arms embargo.
Other human rights activists have called on countries to boycott the Beijing Olympics this August because of China's close relationship with Sudan.
And Hollywood star Mia Farrow voiced her own criticism, coining the phrase “genocide Olympics”, words that must have made Beijing officials shudder.
So China is currently attempting a delicate balancing act - trying to manage the expectations of the international community while maintaining close ties with Khartoum.
It adjusted its Darfur policy because it wants to be seen as a responsible player on the world stage, with a diplomatic stature to match its growing economic might.
More importantly, it does not want anything to impact on the Olympic Games.
It is not clear how Mr Spielberg's decision will affect the Olympics. But some analysts doubt it will lead to others cutting their links with the event.
“Most sponsors have anticipated this kind of an issue, are prepared to deal with it, and will continue to support the games,” said David Wolf, from media consultants Wolf Group Asia.
Chinese leaders will be hoping he is right.