By Jawad Kakar

FAIZABAD, Afghanistan (Reuters) - Afghan Taliban militants have strengthened their grip on lucrative illegal mining operations in the north of the country, as security forces focus most of their efforts on battling the insurgency in the volatile south, officials said.

Abuses by local commanders with private militias and beyond the purview of central government have also driven people into the hands of Islamist fighters, the officials added, making it easier for them to profit from small-scale mines in the region.

"The Taliban provide protection for the villagers to mine and the people are happy to do it despite the fact that there's a presidential decree banning any uncontrolled mining," said Gul Mohammad Bedar, deputy governor of Badakhshan province.

He estimated that the militant group, fighting to overthrow the Western-backed government in Kabul, raised about a third of its funding needs in Badakhshan from deposits of minerals, including semi-precious lapis lazuli, found in its mountains.

Opium, grown mainly in the south of Afghanistan, is by far the biggest source of revenue for the Taliban nationwide, with the total value of opiates reaching as much as around $2-3 billion annually, according to the United Nations.

Mining, by comparison, is worth several tens of millions of dollars a year, although that proportion rises in the north.

Insurgents have taken authorities by surprise in the last year or so by seizing large swathes of territory in a part of the country where their presence has traditionally been weaker.

"We always thought that since much of the north, especially Badakhshan, Takhar and even parts of Kunduz, were anti-Taliban, we would be fine and the militants would never be able to gain ground, but we were wrong," said one Afghan security official, speaking on condition of anonymity.

Last month's attack on Kunduz, the city that the Taliban briefly seized last year, underlined the movement's growing strength in the north and the problems the government has had in enforcing its authority even in a traditional stronghold.

The grip the Taliban still holds on surrounding area was underlined last week by a raid by Afghan and U.S. forces on a nearby village in which two Americans died.

More than 30 civilians, half of them children, were killed in an air strike called in to protect the troops, and the commander of U.S. forces in Afghanistan has promised an investigation.

MINES THERE "FOR US"

Lack of security and infrastructure has meant mine reserves in Afghanistan remain largely untapped, and up to 10,000 deposits are estimated to be outside government control.

Most being exploited are small, artisanal operations.

"I have been digging mines, especially lapis, for years," said Mohammad Zahir, a farmer in the Mahdan area of Keran Munjan district in Badakhshan.

"These mines are created by our Allah for us to dig and feed our families and it is not the property of the government or others."

As well as lapis lazuli, a semi-precious blue stone mined for thousands of years in the region, gold mines and emeralds in Raghestan and Keran Munjan districts have grown in importance over recent years, according to Bedar.

The country also boasts major deposits of industrial metals, including the huge Mes Aynak copper deposit in Logar province near Kabul that is valued at $3 billion.

But security concerns and the shortage of roads and railways mean the Chinese company that bid to develop it has yet to start production nine years after winning the contract.

LOCALS "INVITE TALIBAN BACK"

Afghanistan is estimated to contain mineral deposits worth $1-3 trillion, including gemstones and precious metals, copper, marble and iron ore.

Much of it is in remote northern regions like Badakhshan, where Taliban revenue collectors have moved in, working with smugglers to ship stones out of Afghanistan for processing.

Allowing the Taliban to boost its revenues has given them a financial base to expand operations in the north, where government control outside the main district and provincial centers is minimal.

Maheullah Noori, a spokesman for the ministry of mines, said the government had no official estimate of the amount raised by insurgents from mining, but local MP Safiullah Muslim said the figure ran into millions of dollars a month.

"Gold, emeralds, rubies, and amethyst are all illegally mined by local militiamen and the Taliban who profit by hundreds of millions of afghanis monthly," he said.

Shir Aziz Kamawal, commander of police for the northern zone, said abuses by local strongmen had encouraged some local villages to work with the Taliban instead.

"Now that the Taliban are there, they have been looking into funding their fighting and digging mines."

For much of the past two years, as Afghan forces fought largely alone following the withdrawal of foreign combat troops at the end of 2014, the strategic focus has been on southern provinces like Helmand, a Taliban heartland and source of much of the country's opium.

But in the north as well, local officials said it would be difficult to restore trust in Kabul's authority.

Abdullah Naji, a member of Badakhshan's local provincial council, said there had been two recent operations by Afghan forces to push the Taliban back, but security forces struggled to hold areas they captured, and insurgents soon returned.

"The local people invited them back because it is good business."

($1 = 65.74 afghanis)

(Additional reporting by Sardar Razmal and Hamid Shalizi; writing by James Mackenzie; Editing by Mike Collett-White)