LIMA (Reuters) - Indigenous villagers ended a 43-day protest that had halted production in Peru’s largest oil block after signing a deal with the government, tribal leaders and officials said on Tuesday.

As part of the agreement, the government of President Pedro Pablo Kuczynski promised to apply an indigenous rights law before awarding any new, long-term oil drilling contract for Block 192 -- a chief demand of protesters, the energy and mines ministry said in a statement.

Canadian Frontera Energy Corp operates Block 192 under a two-year contract but has not produced any oil from it since Achuar, Quechua and Kichwa indigenous tribes seized oil wells on Sept. 18.

Protesters wanted the government to clean up oil pollution in the region and to commit to including tribes in talks on long-term oil drilling plans.

The blockade was one of scores of conflicts that sometimes disrupt mining and energy operations in Peru, the world’s second biggest copper producer and a relatively small oil producer.

Talks between the government and Frontera over a long-term drilling contract ended with no deal, state-owned oil company Petroperu announced earlier this month.

Aurelio Chino, a chieftain in the Pastaza River Basin, told Reuters that protesters were no longer occupying company installations. A statement by the leaders of 16 villages that took part in the protests said the protest would end.

The government also promised villagers that it would start implementation of an emergency healthcare program in the next 10 days and would form a commission to direct environmental clean-ups in Block 192, the ministry said.

Frontera will be summoned to take part in dialogue sessions with villagers to discuss their needs, it added.

Frontera has said that the protest did not have a not a material impact for the company.