CARACAS—China has promised to lend $20 billion to Venezuela, the country's President Hugo Chávez said over the weekend, underscoring the Asian giant's push to deepen ties to oil-rich nations in the developing world.

The credit—which Mr. Chávez said ranks among China's biggest foreign loans ever—shows the growing importance of oil in China's energy mix, and the lengths the fast-growing nation is willing to go to secure it. Once a net oil exporter, China is now the world's third biggest oil importer.

Mr....