A judge's ruling on Friday in a lawsuit filed by eight kids forces the state of Washington to get dead-serious about the threat of climate change.

In what the activist teens and pre-teens called a surprise decision, King County Superior Court Judge Hollis Hill ordered the state Department of Ecology to create rules to reduce greenhouse gas emissions by the end of 2016. The judge said the urgency of climate change and the state’s responsibility to protect citizens required that the Ecology Department be held to a deadline, rather than make its own timeline.

Current state targets, set in 2008, call for a reduction in emissions of 50 percent below 1990 levels by 2050. The kids argue that current science makes clear that the cut should be at least 80 percent.

After the state withdrew draft emissions rules in February for more work, lawyers for the children went back to court, asking the judge to press regulators to act.

"This is a massive victory," said Gabe Mandell, 14, who was among the eight kids who brought the lawsuit.

Our Children's Trust

The judge ordered the state to produce rules cutting greenhouse gas emissions by the end of the year, and to make recommendations to the state legislature during its 2017 session to align emission-reduction goals with current science. She also ordered the Ecology Department to consult with the youth petitioners as they draw up the plans.

"The reason I'm doing this is because this is an urgent situation," Hill said. "These children can't wait, the polar bears can't wait, the people of Bangladesh can't wait. I don't have jurisdiction over their needs in this matter, but I do have jurisdiction in this court, and for that reason I'm taking this action."

"We agree with Judge Hill, climate change is a global issue and science is telling us that what was projected years ago is happening today and we need to act now to protect our environment and economy for future generations," Camille St. Onge, communications manager for the Washington State Department of Ecology, told The Huffington Post in an email. "We're working vigorously on Washington’s first-ever rule to cap and reduce carbon pollution and help slow climate change. We’re on schedule to adopt a rule in the coming months and continue our state’s leadership in addressing climate change."

The ruling gives a boost to activists fighting state, federal and international authorities for tighter restrictions on planet-warming emissions. The non-profit human rights group Our Children’s Trust, which represents the Washington kids, is involved in some of the other cases.

"This is the first court in the U.S. to not only find that a state is infringing on the the rights of young people, but to also order the state to develop emissions regulations," Julia Olson, executive director and chief legal counsel of Our Children's Trust, told HuffPost. "It's remarkable."

"For the first time, a U.S. court not only recognized the extraordinary harms young people are facing due to climate change, but ordered an agency to do something about it," said Andrea Rodgers, the attorney representing the eight children.

Remember the kids who sued the state for failing to protect their generation from climate change damage? They won. https://t.co/VIadiDlOu1 — The Stranger (@strangerslog) April 29, 2016

Rodgers argued in court that "extraordinary circumstances" should change the earlier ruling that left the Ecology Department to its own timeline.

"It's not climate change that's the extraordinary circumstance, it's that this agency hasn't done what it's legally obligated to do for almost 30 years," Rodgers told reporter Sydney Brownstone of the alternative newspaper The Stranger, outside the courtroom.

As evidence of the serious threat posed by climate change, Rodgers presented the forced relocation of Washington’s Quinault Indian Nation due to rising sea levels, The Stranger reported.

"People think that this is something that's going to happen down the road when our friends, and our family, and our people in Washington are literally being relocated," Rodgers said.

A 2015 report by the University of Washington found climate change impacts on the Puget Sound region included increases in air temperature, rising sea levels, ocean acidification, projected decreased snowpack, more flooding, and harm to plants and animals.

Just weeks ago, a federal judge allowed a similar lawsuit brought by 21 youth against the federal government to proceed. The lawsuit alleges that the U.S. and the fossil fuel industry are violating the plaintiffs’ constitutional rights by allowing and supporting the combustion of fossil fuels.

"These legal orders are building," Olson said. "I believe there will be more of these cases in other states, and around the world.

"What we are seeing is that the judicial branch of our government has a critical role to play given the state of climate change," Olson said. "It has a job to hold the other branches of our government accountable."

States and the federal government have the power to regulate air emissions, which can contain greenhouse gases that are the primary driver of human-driven climate change. Toughening regulations has been a major initiative of President Barack Obama, but legal challenges from mostly Republican-led states have stalled regulations to curb carbon emissions by power plants.

Update: This story has been updated with comment from the Washington State Department of Ecology.