Chinese President Hu Jintao told Sudan's war crimes-indicted President Omar Hassan al-Bashir that China hoped north and south Sudan could resolve their problems through dialogue and become friendly neighbours.
"China upholds a friendly policy towards Sudan, and this policy will not change regardless of changes internationally or in Sudan's domestic situation," state news agency Xinhua paraphrased Hu as saying.
Chinese officials have said that talks during the visit would take up the July 9 planned secession of south Sudan, a split that will see the northern government in the capital of Khartoum lose three-quarters of the country's oil output of about 500,000 barrels a day.
China is a major buyer of Sudanese crude oil, and is keen to ensure the partition of Sudan into two states will not descend into fighting that could disrupt supplies and damage Beijing's stake on both sides of the new border.
Bashir, who called Hu his "friend and brother", said Sudan hoped to maintain stability between the north and south of the country, Xinhua quoted him as saying.
Bashir, facing a warrant from the International Criminal Court over war crimes charges stemming from fighting in the Darfur region of Sudan, had been due to arrive on Monday in China, one of the few country's willing to host him.
His meeting with Hu was pushed back two days after what the Chinese Foreign Ministry called "technical problems" forced a change in his aircraft's flight plan.
Bashir has found no shortage of friends in Beijing while extolling China for its help in developing Sudan's energy infrastructure.
During a visit to China's state-owned oil and gas giant, China National Petroleum Corp (CNPC), Bashir praised China's role in extracting his country's energy resources.
"CNPC has not only brought us oil, it has also brought us peace," he told CNPC general manager Jiang Jiemin on Tuesday, according to a statement posted on Wednesday to the company's website (www.cnpc.com.cn).
Bashir and Hu signed an agreements to deepen oil and gas cooperation and for preferential loans after their meeting, but no details were given.
Hu said China would encourage its companies to invest in mineral exploration and extraction in Sudan, Xinhua added, also without providing details.
Sudan was China's sixth biggest source of imported crude oil last year, when it supplied 12.6 million tonnes, compared with 44.6 million tonnes from the top supplier, Saudi Arabia.
China has been building ties with the emerging state in southern Sudan but remains a major supporter of Bashir, including acting as Khartoum's top arms supplier.
China has shrugged off calls from human rights groups calling for Bashir's arrest, and has said it has "serious reservations" about the war crimes charges.