BENGHAZI, Libya (AP) — Libya will resume oil exports after the U.N.-backed government reached a deal with a powerful militia that controls key terminals in the east.

The National Oil Corporation, which is controlled by the U.N.-backed government in Tripoli, said Wednesday it has assumed control of the oil ports and will resume exports within hours.

The self-styled Libyan National Army, which is allied with a rival government in the east, seized the ports from another militia earlier this year. That prompted the NOC, with international support, to issue a "force majeure" to halt exports.

The LNA said it agreed to return the ports in return for a commitment by the Tripoli-based government to investigate allegations that oil and gas revenues had been used to fund terrorist organizations.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.