VANCOUVER (Reuters) - Barrick Gold Corp (>> Barrick Gold Corp) said on Wednesday it would work with the government of Tanzania to find a way for a gold export ban to be lifted on its Acacia Mining (>> Anglo American) unit and was aiming for a final agreement in the first half of 2018.

The comments came in an earnings report from Barrick, which showed slightly weaker-than-expected third-quarter earnings due to lower production and gold prices as well as the impact of Acacia's halted exports.

The Canadian miner, which owns 63.9 percent of Acacia, lowered the top-end of its 2017 production forecast range and raised the bottom-end of its cost outlook.

Barrick's stock dipped to $15.65 in New York, from a closing price of $15.75.

Barrick last Thursday said it had reached a framework deal to end a months-long dispute between Acacia and the Tanzanian government, which included the government getting a payment of $300 million from Acacia and a 16 percent stake in Acacia's three in-country gold mines.

Barrick said on Wednesday the $300 million would be paid out of Acacia's "ongoing cash flows" meaning payment would depend on Acacia's ability to resume exports. Barrick and the east African country would look at setting up joint oversight and verification of concentrate shipments, the company said.

The government accuses Acacia of understating its gold shipments. Acacia has denied the allegations. The government in March banned unprocessed mineral exports as part of a push to reap greater rewards from the country's resources.

Acacia's operations affected by the ban account for about 6 percent of Barrick's 2017 gold production forecast.

Barrick said it expects to produce between 5.3 million and 5.5 million ounces of gold this year at all-in sustaining costs of between $740 and $770 per ounce.

It had previously expected to produce 5.3 million ounces to 5.6 million ounces of gold at all-in sustaining costs of $720 to 770 per ounce.

Barrick's adjusted earnings declined to $186 million, or 16 cents a share, in the third quarter, slightly below analysts' estimates of 17 cents. Earnings were $278 million, or 24 cents a share, in the same quarter last year.

Earnings were hurt by Barrick making a tax provision of $172 million for outstanding claims against Acacia.

Acacia on Thursday said it noted the tax provision and added it does not intend to make any changes to its own provision of $128 million.

Barrick said it had reduced its total debt by nearly $1.5 billion this year, beating its 2017 target.

(Additional reporting by Susan Taylor in Toronto, Sanjeeban Sarkar in Bengaluru; editing by Andrew Hay and Jason Neely)

By Nicole Mordant

Stocks treated in this article : Barrick Gold Corp, Anglo American, Acacia Mining PLC