RIO DE JANEIRO — A federal judge in Brazil has temporarily halted a plan by President Michel Temer to allow mining in a large area of the Amazon forest, dealing a victory to environmental activists who had denounced the initiative as potentially calamitous.

In a ruling issued Tuesday, Judge Rolando Valcir Spanholo said the executive branch had exceeded its authority in rescinding the designation of a 17,700-square-mile region known by the Portuguese acronym Renca as a protected area through a presidential decree. The judge said that only Congress could make that change.

The ruling came after the government sought to respond to an international outcry by issuing an updated version of the Renca decree that more broadly outlined steps to mitigate environmental damage, safeguard the rights of indigenous communities and retain protected areas. But opponents say that the plan will hasten development that has encroached on the rain forests and accelerate deforestation and the displacement of native peoples.

The injunction was granted in response to a lawsuit filed by Antonio Carlos Fernandes, a lawyer and university professor in the northeastern city of Fortaleza who said he felt compelled to act after reading about the growing opposition to the decree in Brazil and abroad.