The roughly 300 Indians who spent three weeks camped out at the construction site of a giant dam in the heart of the Brazilian Amazon ended their protest Wednesday after reaching an agreement with the builders.

The pact followed two days of talks between indigenous leaders and executives of the Norte Energia consortium, the contractor said in a statement.

Work on the $10.6 billion Belo Monte project, which began in March 2011 near the city of Altamira in Para state, has already harmed water quality in the Xingu River, the Indians said earlier this week in a message to Brazilian President Dilma Rousseff urging her to revoke the permit for the dam.

The accord between the Indians and Norte Energia calls for the construction of seven security posts in the surrounding indigenous villages and for the consortium to immediately implement environmental mitigation measures.

Norte Energia will also donate a score of vehicles to the villages and pay for the training of two drivers for each community, a spokesperson for the consortium told Efe.

The agreement also mandates the creation of one committee to monitor the portion of the Xingu affected by the dam and another panel to ensure that the consortium fulfills its promises.

The 11.2 GW dam complex on the Xingu River will be the world's third-largest after China's Three Gorges and Itaipu, jointly operated by Brazil and Paraguay.

Environmentalists and indigenous protesters say the dam will flood 516 sq. kilometers (200 sq. miles) of jungle, displace 50,000 people and cause severe damage to the local ecosystem.

Brazilian officials insist the Belo Monte dam is necessary to keep pace with the country's burgeoning energy needs. EFE