Australian company Mali Lithium will buy the firm that holds the two miners' stakes in the mine - the other 20% of which is owned by the government of Mali - for a fee estimated at between $22 million and $27 million, Barrick Gold and AngloGold Ashanti said.

Both miners said the deal would allow them to focus their capital or attention elsewhere, would extend the life of the mine and "benefit in-country stakeholders". Neither mentioned the political situation in Mali.

Mali's President Ibrahim Boubacar Keita resigned and dissolved parliament earlier in August, hours after soldiers held him at gunpoint and seized power in a coup.

The crisis caused the closure of the country's borders, in a nation where miners typically fly their gold out to be refined.

It also raised the risk of further political turmoil in Mali, which, in common with other countries in the region, faces a growing threat from Islamist militants.

Barrick Gold said the mine, known in its heyday as "Morila the Gorilla", had produced 6.9 million ounces of gold, generated more than $2.5 billion for its stakeholders in taxes and dividends, and served as its legacy firm's base for expansion elsewhere in Africa. However it was forecast to close in 2021.

Mali Lithium said it was excited and privileged to acquire one of "West Africa's great gold mines".

It added it wants to ramp up operations at the mine as soon as possible.

The deal remains subject to Mali Lithium finding funding and the government of Mali allowing it to go through. The parties aim to complete the transaction by October.

By Emma Rumney