A UN resolution was adopted on Wednesday that should make it easier to hold polluting countries legally accountable for failing to tackle the climate emergency, in a vote which was hailed as a historic victory for climate justice.

The UN general assembly adopted by consensus the resolution spearheaded by Vanuatu, a tiny Pacific island nation vulnerable to extreme climate effects, and youth activists to secure a legal opinion from the international court of justice (ICJ) to clarify states’ obligations to tackle the climate crisis – and specify any consequences countries should face for inaction.

“Today we have witnessed a win for climate justice of epic proportions,” said Ishmael Kalsakau, prime minister of Vanuatu. “Today’s historic resolution is the beginning of a new era in multilateral climate cooperation, one that is more fully focused on upholding the rule of international law and an era that places human rights and intergenerational equity at the forefront of climate decision-making.”

“We are just ecstatic that the world has listened to the Pacific youth,” said Cynthia Houniuhi, president of Pacific Island students fighting climate change (PISFCC). “Through no fault of our own, we are living with devastating tropical cyclones, flooding, biodiversity loss and sea level rise. We have contributed the least to the global emissions that are drowning our land.

“As young people, the world’s failure to stop planet-killing emissions is not a theoretical problem. It is our present and it is our future that is being sold out.”

The resolution, which was co-sponsored by more than 120 countries including the UK, but not the US, will help establish a legal litmus test of sorts for the global climate justice movement seeking to hold countries to account for climate failures in the courts.

It comes on the day the Biden administration opened an auction to drill 73m acres of the Gulf of Mexico for oil and gas – and just days after the self-acclaimed “climate president” approved a massive, multi-decade-long oil and gas drilling project in Alaska, which will create one of the largest “carbon bombs” on U.S soil.

While the opinion from the world’s highest court will not be binding in domestic courts, establishing international legal rules can be influential on judges and governments. It also represents the first attempt to establish climate action obligations under international law, which advocates hope will strengthen climate-related litigation by helping vulnerable states and advocates hold countries accountable for their action and inaction.

The resolution emerged out of mounting frustration at the mismatch between the global community’s rhetoric and action on climate change, amid escalating losses for countries such as Vanuatu, which face an existential threat due to sea-level rise. The frustration spurned a social movement led by Vanuatu law students turned youth activists, and work on the resolution was led by Indigenous lawyers in the Pacific.

In essence, the ICJ advisory will help establish whether there is legal obligation for countries to do what they have committed to in non-binding treaties such as the 2015 Paris climate accord, and whether failure to do so can be challenged through litigation.

It comes a week after the final report by the IPCC, which underscored the urgent need to phase out fossil fuels to curtail global heating and avoid catastrophic climate chaos. Transitioning to renewables and green technology is not enough, warned scientists, fossil fuels projects must be phased out, not expanded.

Harjeet Singh, head of global political strategy at Climate Action Network International, said: “The UN resolution to take the issue of climate change to the world’s highest court is a historic moment in the fight for climate justice, human rights and intergenerational equity.

“The advisory opinion must serve as an important accountability tool towards states obligations in protecting the environment and future generations from climate impacts.”

Vanuatu, an archipelago of islands 500 miles west of Fiji with about 325,000 habitants, was last month hit by two category 4 hurricanes within 72 hours of each other. They caused widespread infrastructure damage, evacuation and left residents without water and electricity for several days.

Island nations and developing countries such as Vanuatu, the Solomon Islands Madagascar and Sri Lanka have contributed least to global greenhouse-gas emissions, but are bearing the brunt of erratic and extreme weather events such as hurricanes, floods, drought, and extreme heat and floods that is upending water and food security, and fueling forced migration.

The historic resolution was adopted as countries met in Egypt for the first time to discuss the creation of a loss-and-damage funding facility to compensate countries for the irreversible effects of extreme weather events and sea-level rise that are too late to avoid by climate adaptation and mitigation.

“The International Court of Justice can translate the clear scientific evidence that fossil fuels are driving the climate crisis into clear legal imperatives to phase them out now and implement proven, available solutions. An advisory opinion could help spur greater accountability for the mounting suffering caused by states’ failure to act,” said Nikki Reisch from the Centre for International Environmental Law.