China and Indonesia have pledged to strengthen economic ties and maintain peace and stability in the region, China's Foreign Minister Wang Yi said on Thursday after a meeting with his Indonesian counterpart, Retno Marsudi, in Jakarta.

Wang also called for all parties in the Gaza conflict to exercise restraint, and said the United States should support a United Nations resolution for a ceasefire in Gaza.

"Both ministers expressed resentment over the humanitarian disaster due to the Palestine-Israel conflict. We agree that the UN Security Council resolution on a ceasefire must be fully implemented and without any condition," Wang said after the meeting, in remarks that were translated into Indonesian.

Wang urged the United States to "listen to the international community" amid concerns over the escalating conflict in the Middle East.

"The UN Security Council is a collective security mechanism that must not be used by a certain country," Wang said.

Indonesian Foreign Minister Retno Marsudi said she hoped China would "would use its influence to prevent escalation" in Gaza, emphasising the need for a two-state solution.

Indonesia and China, its largest trading and investment partner, are seeking to further strengthen economic ties through deepened investment in infrastructure, downstreaming, food sustainability and Indonesia's energy transition, Retno said.

Chinese investment in Indonesia reached more than $7.4 billion last year, she added.

Wang is scheduled to attend the China-Indonesia High-Level Dialogue Cooperation Mechanism meeting with several senior Indonesian ministers in Labuan Bajo on Friday to discuss further cooperation in more detail.

During Friday's bilateral meeting both countries pledged to maintain peace in the Indo-Pacific region, with Yang saying he expected that negotiations on the code of conduct on the South China Sea could be accelerated.

The Association of Southeast Asian Nations (ASEAN) and China have for years been trying to create a framework to negotiate a code of conduct, a plan dating as far back as 2002. But progress has been slow despite commitments by all parties to advance and expedite the process. (Reporting by Ananda Teresia; Writing by John Mair; Editing by Jacqueline Wong and Gerry Doyle)