* State takes 16% stakes in Barrick mines
* Seized gold, copper concentrate will now be exported -Magufuli
* Two sides struck deal in October
* 'We almost lost hope' -minister (Adds announcement on concentrates, Barrick statement, AngloGold Ashanti statement, quotes)
By Fumbuka Ng'wanakilala
DAR ES SALAAM, Jan 24 (Reuters) - Canada's Barrick Gold Corp signed a deal with Tanzania on Friday in which the government will take stakes in three gold mines, ending a long-running tax dispute and setting a template for negotiations with other firms.
It was signed by Barrick CEO Mark Bristow and Tanzanian minerals minister Doto Biteko at a ceremony in the commercial capital, Dar es Salaam.
It follows an announcement by the two sides in October in which they agreed to a payment of $300 million to settle outstanding tax and other disputes, the lifting of an export ban on concentrates and the sharing of future economic benefits from mines.
South Africa-born Bristow, describing the dispute as a "long safari" since it emerged in 2017, struck a conciliatory tone in a speech at the ceremony broadcast on state TV. Safari means "journey" in Swahili.
"Many people said your criticism will chase away investors ... what it's done is challenge the mining industry and all of us to embark on something where we win together or lose together," Bristow said to applause.
Casting himself as a "Zulu boy" born in Zululand, Bristow called it a "historical day" for Africa.
"President, what I am here to do today is to offer you the hand of Barrick," the CEO added, moving from the lectern to shake President John Magufuli’s hand.
The company said it had budgeted $50 million for brown and greenfield exploration in Tanzania in 2020.
"I thank God for the success of this agreement, said Magufuli, who has made a point of extracting more income from natural resources and described the negotiations as a clash between a cow and a rabbit.
He said confiscated containers of gold and copper concentrate could now be exported to the benefit of Twiga Minerals, a new joint venture set up to manage the Bulyanhulu, North Mara and Buzwagi mines.
"Twiga Minerals represents a structure which allows the government and the people of Tanzania to be involved in the decision-making of everything that we do together," Bristow said.
Foreign Affairs Minister Palamagamba Kabudi, who led Tanzania's negotiating team, said Tanzania now owns 16% undiluted shares in Twiga Minerals, as well as a 16% stake in each of the Barrick mines.
"We almost lost hope in the discussions with Barrick and I was ready to tender my resignation to the president for failing to complete this task, but we ultimately got the deal done," Kabudi said.
The dispute originally involved Acacia Mining, which was bought out by Barrick. The government imposed a ban on exporting mineral concentrates in 2017 after accusing Acacia of tax evasion, leading to a one-third cut in the miner's output.
Minerals make up the majority of Tanzania's exports and are a key source of foreign exchange for Africa's fourth-biggest gold producer.
The government said it is renegotiating mining agreements with all existing companies to get a minimum 16% stake in each large-scale mine, in accordance with mining laws passed in 2017.
Mining licences from now on will be issued by Tanzania's Mining Commission under the guidance of the president, Kabudi said.
South African miner AngloGold Ashanti's Geita is the largest gold mine in Tanzania. Other miners operating in the country include Shanta Gold and Petra Diamonds.
"It’s encouraging for all stakeholders in the mining industry that Tanzania and Barrick have formalised an agreement and have started a new chapter in the country," said an AngloGold Ashanti spokesman.
"This deal is a sigh of relief not just for Barrick or the mining industry in Tanzania, but for investors in the broader region," said Margarita Dimova, associate director at consulting firm Africa Practice.
A mining executive working in Tanzania said the agreement was positive for the sector: "A lot of key issues impacting projects getting off the ground were being pushed aside until the Barrick deal was sorted."
Reporting by Fumbuka Ng'wanakilala in Dar es Salaam, Omar Mohammed in Nairobi and Helen Reid in Johannesburg; writing by Helen Reid; editing by David Holmes and Jason Neely