Brazil's environmental regulator on Friday denied French oil giant Total a license to drill for crude in five blocks near the mouth of the Amazon river.
Regulatory agency Ibama said the license was denied "due to a set of technical problems" identified during the application process.
It explained that the decision was based "on the deep uncertainties" detected in an emergency plan presented, "aggravated by the possibility of an oil spill that may affect the coral reef present in the region and by extension marine biodiversity."
A Brazilian prosecutor warned of "extreme environmental peril" in recommending against the granting of the drilling license earlier this year, saying that: "the only way to guarantee avoiding environmental damage to the area is to deny the license."
Environmental campaigners Greenpeace meanwhile warned that a previously discovered coral reef had been found to extend right into where Total plans to drill.
The finding, made during a research expedition, invalidated Total's environmental impact assessment, which was based on the reefs being located at least five miles (eight kilometers) from drilling, Greenpeace said.
In 2013, Total joined BP and Brazil's Petrobras to buy the exploration blocks near the mouth of the Amazon. But they had yet to win permission to search.
Petrobras is the jewel in Brazil's crown: Latin America's most valuable enterprise, a $100-billion oil and gas group whose crude output puts the country in the top 10 league globally, rivalling that of many OPEC members.
Yet it is also the most indebted oil company in the world. And it is at the heart of the biggest corruption scandal to rock Brazil: a graft probe that has claimed numerous political scalps, not least that of former leftist president Luiz Inacio Lula da Silva.
Today, Brazil has proven reserves of 13 billion barrels and produces 2.5 million barrels of oil a day, according to the US Energy Information Administration.
Petrobras has seen sharply higher profits this year: $2.7 billion in the second quarter, stronger than expected.
Brazil, Latin America's most populous country with 208 million inhabitants, suffered its worst-ever recession between 2014 and 2016.
Last year it returned to growth, but only timidly.
The number of people living in poverty in Brazil grew by two million last year.
Unemployment rose from 6.9 percent to 12.5 percent between 2014 and 2016. The latest figures, dating from October this year, show it has declined to 11.7 percent, government data show.
Explore further: Brazil prosecutor recommends denying Total oil license near Amazon