BEIJING — Sudan's president, wanted on a war crimes warrant, won pledges Wednesday from China and its state-owned energy firm they will continue investing in his country after its resource-rich southern region becomes independent next month.

Sudan's Foreign Minister Ali Ahmed Karti said Wednesday that President Omar al-Bashir came to China hoping to hear Sudan's biggest diplomatic and economic backer would continue to invest in northern Sudan's oil, agriculture and mining sectors. Violence has escalated in areas contested by the north and south, and China has said it wants the two sides to peacefully settle the disputes.

"We had good assurances from his excellency President Hu Jintao that China would go on working with Sudan hand in hand whether politically or financially or economically," Karti told reporters at a briefing two days into a trip that comes just ahead of south Sudan's independence on July 9.

Karti said Chinese leaders also voiced support for al-Bashir though the International Criminal Court has twice issued warrants for his arrest on charges of genocide, crimes against humanity and war crimes in Darfur. China is not a court member and says it's reserving opinion.

Securing China's continued patronage is crucial for the north, which has long had close ties with Beijing but is threatened by Beijing's overtures to leaders in the oil-producing south.

Al-Bashir was greeted Wednesday by President Hu at the Great Hall of the People and given an honor-guard reception.

"The Chinese side will firmly pursue a friendly policy toward Sudan," Hu was quoted as saying by the official Xinhua News Agency. "No matter of the changes in the international situation and internal situation of Sudan, this policy will remain unchanged."

Hu proposed expanding bilateral cooperation by deepening political links, boosting trade and economic cooperation, increasing exchanges and cooperating on international issues, Xinhua said, without providing details.

The leaders witnessed the signing of an economic and technological cooperation agreement, and a pact for a bridge project in the east of the country. No details were immediately given.

Al-Bashir also visited the Beijing headquarters of China National Petroleum Corp., Asia's biggest oil and gas producer by volume, and was assured the state-owned firm would continue to invest in the north, Karti said.

CNPC, which made a 20-year, multibillion-dollar development deal with Sudan in 2007, signed an agreement Tuesday with the government to boost cooperation. A company statement did not give details.

China is uniquely positioned to exert influence over the Sudanese conflict, given its deep trade ties to the resource-rich south and decades-long diplomatic ties with Sudan's government in the north.

China's energy needs make the country deeply vested in Sudan's future. Sudan is sub-Saharan Africa's third-largest oil producer, producing 490,000 barrels of oil a day last year — two-thirds of it to China.

South Sudan's declaration of independence will be the culmination of a 2005 peace deal that ended more than two decades of civil war that killed more than 2 million people.

The violence also resulted in the war crimes charges against al-Bashir, the first against a sitting head of state until similar charges this week against Libyan leader Moammar Gadhafi, who is accused of killing civilians who rose up against his rule.

Karti defended al-Bashir against the war crimes allegations and held up China's support for the Sudanese leader, saying that those who criticized Beijing for inviting him to visit did not understand the history of relations between the two countries, which date as far back as before the African country gained independence in 1956.

"You need a friend like China to speak loudly and talk loudly about this matter," Karti said. "We have our assurances these two days, from all leaders ... that China will support Sudan with regard to the case of the ICC," he said, referring to the court by its abbreviated name.

China is not a member of the court, based in The Hague, Netherlands, and has said the charges accusing al-Bashir of orchestrating atrocities in Sudan's Darfur could cause further instability in the region.

Al-Bashir's arrival in China was delayed a day after still not fully explained confusion over a flight plan.

Karti said that the problem stemmed from a disagreement between the pilot flying al-Bashir's plane and air traffic control authorities in Turkmenistan on the plane's route. The plane had to return to Tehran to plan a new route, he said.