MOSCOW – The presidents of Russia and China on Wednesday called for a diplomatic push to resolve tensions over the nuclear programs of Iran and North Korea after wide-ranging talks in Moscow.

In a joint statement Chinese President Hu Jintao and Russia's Dmitry Medvedev also made a thinly veiled attack on the United States, saying no country should base its defense on expanding military alliances and building missile defenses.

Medvedev also said the two sides had agreed a record $100 billion in energy deals, although it was not clear how much of this figure represented previously announced agreements.

Russia and China assert that the regulation of the situation around the Iranian nuclear program is possible only by political and diplomatic methods, the statement said.

The heads of state expressed their serious concerns in relation to the situation on the Korean peninsula... and call for the speedy restarting of six-sided talks, it said.

Hu came to Russia for a state visit which included two summits of developing world countries covering global trade, security and greater representation for emerging market powers on the world stage.

Russia and China consider international security indivisible and all-encompassing, the joint statement said.

The security of certain countries cannot be ensured at the expense of the security of others, including through the expansion of military political alliances and the creation of global and regional missile-defense systems.

Earlier on Wednesday Hu met Russian Prime Minister Vladimir Putin and praised efforts by Russia and China to pool their influence on the world stage.

We have enacted effective strategic cooperation, which allows us...to assert our joint forces and provide the necessary contribution to achieving peace and stability in the world, Hu said, according to a Russian translation of his comments.

Hu invited Putin to visit Beijing in October. The two leaders know each other well, having met several times when Putin was president of Russia from 2000-2008.

After the meeting with Putin, Hu laid a wreath at the tomb of Russia's unknown soldier at the foot of the Kremlin walls.

Coinciding with Hu's visit, Russia's Economic Development Ministry released figures showing that in the first months of 2009, China had become Russia's biggest trading partner, overtaking Germany and the Netherlands.

(Reporting by Denis Dyomkin and Toni Vorobyova; writing by Conor Humphries; editing by Philippa Fletcher)