China said Thursday it would offer $20 billion in new loans to Africa, underscoring the relationship's growing importance, as Chinese companies agreed to operate more responsibly on the resource-rich continent.

Beijing has poured money into Africa over the last 15 years, seeking to tap into its vast natural resources, and China became the continent's largest trading partner in 2009.

But its aggressive move into the continent has at times caused friction with local people, with some complaining Chinese companies import their own workers, flout labour laws and mistreat local employees.

The loan pledge, made by President Hu Jintao as he opened a Beijing forum on China-Africa cooperation, is double the amount China agreed to lend to Africa at the last such event in 2009 and will cover the next three years.

Addressing African leaders including South African President Jacob Zuma and Kenya Premier Raila Odinga, Hu said the loans would focus on supporting infrastructure, manufacturing and the development of small businesses.

"China and Africa's destinies are closely linked, Chinese and African friendship is deeply rooted in the hearts of the people on both sides," he said.

"China sincerely supports African countries as they pursue their own development paths, and will sincerely assist African countries in strengthening their ability to develop independently."

Hu also promised training and scholarships for African professionals and students, assistance with healthcare, customs and excise and financial support for the African Union.

South Africa's Zuma thanked China for treating African countries as "equals", but he cautioned against allowing an unequal trade relationship to persist in which Africa mainly supplied raw materials.

"This trade pattern is unsustainable in the long term," he told the China-Africa Cooperation Forum.

"Africa's past economic experience with Europe dictates a need to be cautious when entering into partnerships with other economies.

"We are particularly pleased that, in our relationship with China, we are equals and that agreements entered into are for mutual gain."

Africa's rich natural resources are its main export to China, which needs minerals to fuel its massive economic growth, while the continent's major imports are mechanical or electrical products.

Trade between the Asian powerhouse and the continent hit a record $166.3 billion last year, from less than $20 billion a decade earlier and up 83 percent on 2009, according to government data.

Once seen as strictly interested in extracting raw resources and investing in infrastructure, China has interests on the continent that are increasingly shifting to investing in institutions and governments, experts say.

UN chief Ban Ki-moon, speaking at Thursday's forum, said cooperation with China was "creating opportunities for African countries to diversify their economies, create jobs and improve healthcare and education".

But anti-Chinese sentiment has grown in recent years and Zambia's current president tapped into this to win office in 2011, one year after two Chinese managers shot at 11 local workers protesting over poor pay and work conditions.

On Thursday, Chinese state-run bodies operating in Africa signed a declaration of social responsibility in which they pledged to respect local customs, pay more tax and protect the environment, among other measures.

Sponsors of the declaration included the State Development Bank, the China-Africa Development Fund, and China Non-Ferrous Metals Group.

"Chinese companies operating in African countries are paying increasing attention to the fulfilling of their social responsibilities as well as making profits and getting economic returns," said Yu Ping, vice chairman of the China Council for the Promotion of International Trade.

Graphic charting China and Africa's trade balance, 2007-2011. President Hu Jintao on Thursday said China would offer $20 billion in new loans to Africa