China hailed the recent agreement between Sudan and South Sudan that will allow the landlocked South to resume exporting crude oil through its northern neighbor's pipelines after months of tense negotiations.

"China appreciates the practical, flexible and responsible manner the two sides showed during the negotiations as well as the efforts made by the African Union," Chinese Foreign Ministry spokesman Qin Gang told the state media.

Oil-rich South Sudan had previously halted oil production and exports through Sudan back in January after accusing the North of stealing 1.4 billion barrels of oil and amid ongoing territorial disputes that have arisen since the two countries formally separated in July 2011.

China, which had invested billions of dollars in Sudan's oil refining and pipeline infrastructure prior to its separation from the South, was keen on brokering a resolution between the two sides.

Earlier in April, China agreed to loan South Sudan $8 billion for various infrastructure projects, including roads, bridges, hydroelectric power plants, agriculture development and telecommunications networks, though it stopped short of offering to finance an alternate pipeline that would allow the South to export oil through other neighboring countries.

Following the agreement between the two Sudans, Qin "urged South Sudan to resume the normal production and transportation of crude oil, and take substantial measures to protect the interests of its cooperation partners," according to the state media outlet Xinhua.