BEIJING, June 14 (Reuters) - China expressed thanks on Tuesday for the dozens of countries it says have offered support for its position on a case brought by the Philippines over Chinese claims in the South China Sea, saying they are speaking out to uphold justice.

China has stepped up its rhetoric ahead of an expected ruling by the Permanent Court of Arbitration in The Hague on the Philippine case.

China refuses to recognise the case and says all disputes should be resolved through bilateral talks.

The Chinese government says more than 40 countries have offered support for its position, the latest being the African nations of Sierra Leone and Kenya.

Foreign Ministry spokesman Lu Kang said certain unidentified countries had been trying to blacken China’s name over the South China Sea, confusing right for wrong and trying to control public opinion.

“Against this backdrop, certain friendly countries which care about China want to understand what’s really going on,” Lu told a daily news briefing.

“Once they’ve worked out the rights and wrongs and gotten the whole story, a fair few countries are willing to speak out from a sense of justice.”

“We express appreciation and thanks for this. It shows that a just cause enjoys abundant support and people have a sense of natural justice,” Lu said.

While a small number of countries wanted to blacken China’s name on this issue, they cannot be said to represent the international community, he added.

China claims almost all of the energy-rich South China Sea, through which more than $5 trillion of maritime trade passes each year. The Philippines, Brunei, Vietnam, Malaysia and Taiwan have overlapping claims.

The Philippines is contesting China’s claim to an area shown on its maps as a nine-dash line stretching deep into the maritime heart of Southeast Asia, covering hundreds of disputed islands and reefs.

Despite China’s protestations it has no threatening intent in the South China Sea, it has bolstered its military presence there with an ambitious land reclamation programme that includes building airstrips for military use.

China’s actions have drawn criticism from the United States.

The United States is not a claimant in the South China Sea dispute but says it has an interest in ensuring freedom of navigation and overflight in the area.

The United States and the European Union have called on China to respect the ruling from The Hague. The court has no powers of enforcement and its rulings have been ignored before.