Benin’s government agreed to unblock oil exports from neighboring Niger after officials from China National Petroleum Corp. intervened in a dispute between the two countries.

The announcement ends a weeklong impasse that began when Benin barred the first shipment of Nigerien crude under a deal with the state-owned Chinese oil company because of a border dispute with Niger. The crude shipments will be used by Niger to repay a $400 million loan from CNPC.

China dispatched Foreign Ministry and Energy Ministry officials, along with CNPC executives, to Benin to help resolve the dispute, Africa Intelligence, a Paris-based newsletter, reported on Wednesday.

“Benin authorizes the loading of the first ship currently that’s anchored in our waters,” Beninese Mines Minister Samou Seidou Adambi told reporters at a briefing posted on the government’s official X account. The minister spoke alongside CNPC Director-General Yuan Wenyuan at the briefing, according to the government. 

Niger ships oil to an export terminal in Benin via a 1,200-mile pipeline to the Agadem Complex oil field that’s operated by CNPC. The conduit — part of a $4.6 billion investment by China in Niger’s oil industry — is expected to ship 110,000 barrels per day once its fully operational..

“Benin has no intention of harming the interests of the state of Niger, nor those of our common partners,” Adambi said.