Ecuador, South America's fifth largest oil producer, approved in April an oil law that obliges companies to hand over at least 50% of their oil revenue above a benchmark price agreed in their original contracts.

Tuesday's court ruling was a boost to Ecuador's efforts to secure more benefit from its energy industry as it joins Venezuela and Bolivia in introducing tighter controls over profits from natural resources.
  
Maria Fernanda Encalada, the court spokeswoman, told Reuters: "The tribunal decided unanimously to reject the claim."

Ecuador's Constitutional court ruled to upheld the legality of the law after local business groups filed the claim arguing the legislation violates international agreements and the country's constitution.
  
Analysts have said the new law may curtail future investment in Ecuador's key oil sector. Companies that could be affected by the law includes Spain's Repsol-YPF and Brazil's Petrobras.

Alfredo Palacio, the Ecuadorian president, aggressively lobbied for the law, arguing the country has the right to get a bigger share of foreign companies record high profits amid soaring oil prices.

The law is expected to generate about $255 million this year alone for Ecuador.