(Repeats to widen distribution)
* High-ranking official set to resign over changes
* Law would apply mostly to energy industry in Amazon, not mining in Andes
* Excluding Quechua-speaking communities could cause frustration
* Concerns about billions in investments
By Mitra Taj and Teresa Cespedes
LIMA, May 1 (Reuters) - Peru's mining minister is winning a crucial cabinet battle by swaying President Ollanta Humala to water down a law that gives indigenous groups more say over new mines and oil projects - and a deputy minister will likely resign in protest.
According to half a dozen people with direct knowledge of the internal tug-of-war, Mines and Energy Minister Jorge Merino has prevailed in excluding Quechua-speaking communities in the mineral-rich Andes from being covered by the law.
Sources said he fears applying the law throughout the highlands - as the government once said it planned to do - would delay a pipeline of mining investments worth $50 billion.
Several people in Merino's office declined repeated requests by phone and email for comment.
The tussle underscores a quandary facing Peru, one of Latin America' fastest-growing economies: how to develop its vast mineral wealth while also addressing a legacy of inequality from its colonial past.
The "prior consultation law," which Humala touted during his 2011 campaign as a salve for widespread conflicts over natural resources, requires companies to negotiate agreements with indigenous communities before building new mines or oil wells around their lands.
It does not give the communities the power to veto a project, but miners have said it could snarl approvals for new mines for everything from gold to lead.
"Merino has realized that with this law the government was shooting itself in the foot," an industry source said.
Eva Arias, the head of the country's association of mining firms, was more diplomatic.
"We hope the law isn't politicized. It could be a tool to forge consensus and development ... otherwise it could slow investments," she told reporters.
Foreign investment in mining has traditionally powered Peru's fast-growing economy. Sources from the private sector and government said the debate over how to apply the new law has pitted the mining and finance ministries against the ministries of culture, environment and social inclusion.
Ivan Lanegra, a deputy minister for culture charged with implementing the law, plans to quit over the changes as soon as this week, two well-placed sources said.
"Merino seems to have won," said a former cabinet chief close to the controversy, adding the changes might worsen the tensions between towns and firms the law aimed to prevent.
"I think this is a big mistake and we will all pay at the end of the day," the source said. "When these communities get angry they are going to attack the mines under their noses."
Humala has reshuffled his cabinet twice since taking office after anti-mining protests turned violent.
Quechua - the language of the Incan empire - is spoken by an estimated 3 million to 5 million people in Peru. The Quechua are the most numerous and widespread of about 50 indigenous groups in Peru.
DENIAL OF RIGHTS?
Lanegra maintains the law should cover Andean Quechua-speaking communities because they are "indigenous" - with a unique language and culture, and shared use of land.
Merino's position is that the Quechua should not be considered "indigenous" under the law because they mixed with Spanish colonizers centuries ago, often have formal town assemblies, and are less isolated than Amazon tribes.
Quechua activists say they view themselves as indigenous.
"We don't want to be invisible anymore. We want the right to say 'this is what we want in terms of development,'" said Tania Pariona, a Quechua leader from the Ayacucho region.
Quechua towns have often been called "peasant communities" since an agrarian reform in the 1970s, but tribes in the Amazon - which holds most of Peru's oil and gas fields - are referred to as "indigenous" or "native."
Peru's human rights office said "peasant communities" hold about 19 percent of all land and "native communities" 9 percent.
Humala, speaking on TV on Sunday, seemed to endorse Merino's stance.
"In the highlands there are mostly agrarian communities ... indigenous communities are mostly in the jungle," Humala said.
"The spirit of the law is to give voice to communities that don't have one," Humala said. "These days few communities lack an official like a mayor that links them to the government."
Humala's position may further frustrate critics who say he abandoned parts of the left that voted for him and cuddled up to big business after taking office.
"It's not about vulnerability or cultural 'purity,' but 'cultural difference,'" Lanegra said days before Humala spoke.
"Quechua are indigenous. There is no way around it," under Peru's law and the U.N. pact on indigenous rights, Lanegra said.
Lanegra also wanted exploratory mining projects to adhere to the law, but last week the government exempted 14 of them.
"If there is no exploration there is no mining," said Merino on local TV station Canal N. "We have to stay competitive, otherwise we'll see investments go somewhere else."
Mining makes up some 60 percent of Peru's export earnings, though domestic spending has driven the country's impressive 6 percent annual growth rates in recent years.
More than 20 countries have ratified the U.N. pact on indigenous rights, and officials regard Peru as the first to codify a prior consultation law.
After taking office, Humala signed the law in 2011 in the jungle town of Bagua, where a clash between police and Amazon tribes killed 33 people in 2009, hurting President Alan Garcia, whose term was marked by some 200 deaths in protests.
Humala at the time specifically mentioned the Quechua as a group that would be covered by the law.
At least 24 people have died in social conflicts so far during Humala's administration - mainly over natural resources.
Many towns fear mining will pollute, use up scarce water supplies, or fail to bring enough jobs and tax revenues.
Nearly 1.5 years since Congress passed the law, Peru is now leaning towards determining if a community is eligible for coverage on an ad-hoc basis.
"The registry of indigenous peoples will develop as time goes by," Prime Minister Juan Jimenez told Reuters last week. (Additional reporting by Patricia Velez and Terry Wade; Editing by Mary Milliken and Philip Barbara)