This was the year that environmental groups won a seven-year battle against the Keystone XL pipeline, representing a major comeback for a movement that had lagged in influence and mass appeal for years. Defeating such a major project also marked the first time activists have been able to draw a line in the sand against an oil industry that had been seemingly immune to such campaigns.

Heading into 2016, it's a movement enlarged and revitalized, one with new power in Washington, D.C. and the ability to mobilize thousands of people worldwide.

The nadir had come in 2010 with the death of cap-and-trade legislation that the mainstream movement had poured years of high-stakes Congressional bargaining into, as well as $229 million. That followed international climate treaty talks in Copenhagen that had unraveled spectacularly in 2009. At the same time, Americans' acceptance of climate change nosedived, dropping from 72 percent in 2008 to 52 percent in 2010, according to a Brookings Institute poll.

"The environmental movement was in a dismal place following years of failed inside-the-beltway strategy," said Bob Wilson, a geographer at Syracuse University who studies the modern environmental movement. "The fight against the Keystone XL pipeline revitalized the movement to an extent that we haven't seen since the 1970s. It has been very difficult to organize around climate change because it is so abstract, so seemingly far in the future. Here was a concrete, solid thing to focus on, something to rally the grassroots around. It worked."

But it did not happen easily or quickly. The ragged coalition that would eventually halt one of the biggest North American fossil energy projects to come along in decades had already been underway for two years. In 2007 and 2008, a collection of philanthropic foundations that champion environmental causes began funding grassroots and national groups to oppose expansion of the Alberta tar sands, the world's third largest oil reserve stretching nearly 55,000 square miles. At the time, almost no one knew about the tar sands, let alone the project's impacts on the environment or climate.

Enter the Keystone XL.

In 2008, TransCanada applied for a U.S. presidential permit to build a segment of pipeline that would connect Alberta's landlocked oil with refineries in the Gulf of Mexico, and give tar sands access to world markets. On its path to Texas, Keystone XL also would cross the Ogallala Aquifer, which supplies about 30 percent of the groundwater pumped for irrigation in the entire U.S. and the drinking water for nearly 2 million Americans. Anti-tar sands activists knew they had found their target.

The campaign's prospects were dim. TransCanada's first wholly owned U.S. oil pipeline, simply called Keystone, had already secured U.S. government approval to cross the Canadian border and carry up to 590,000 barrels a day of a tar sands oil from Alberta to Illinois. Keystone XL too seemed a shoo-in for approval. Any fight against the pipeline meant rallying concern in states along the route, many of them Republican strongholds with little political regard for climate change.

For the next few years, local environmental activists worked alongside the Natural Resources Defense Council and a few other national green groups to educate federal agencies involved in the permitting process about how much the tar sands could exacerbate climate change.

The effort got its biggest rallying point when BP's Deepwater Horizon well exploded in the Gulf of Mexico in April 2010. The ensuing environmental disaster played out the dangers of oil drilling on people's television screens for three months. Nearly five million gallons of oil gushed into the water as BP tried futilely to cap the well.

Meanwhile, a group called Bold Nebraska, led by grassroots organizer Jane Kleeb, started rallying ranchers, residents and indigenous leaders along the proposed Nebraska stretch of the Keystone XL in 2010. Regardless of political affiliation, they saw the dangers of a pipeline through their beloved countryside—connecting the dots between BP's disaster and the Keystone XL.

Following the collapse of the cap-and-trade bill in 2010, national mainstream environmental groups started honing in more on grassroots climate fights around the country, including Keystone XL.

But the fight against the pipeline was still struggling. The next year, environmental author-turned-activist Bill McKibben and his organization 350.org led a two-week sit-in at the White House where more than 1,250 people were arrested. Among them were the heads of several mainstream environmental groups, including the Sierra Club's Michael Brune, whose participation ended the group's 120-year ban against civil disobedience. When 12,000 people showed up to a second protest two months later, they encircled the White House and caused a media frenzy. Keystone XL had officially hit the national spotlight, and newly energized activists discovered they had a winning formula.

Soon after, Obama's State Department issued the first of what would be several delays to assess the pipeline's route and risks.

"The fight against Keystone XL was never just about that pipeline," said Kenny Bruno, coordinator of the Moving Beyond Oil Campaign and one of the grassroots activist brought in to create an anti-tar sands strategy in 2008. "It was a new way of campaigning, a new energy and a new spirit."

Over the next four years, the grassroots-driven fight against the pipeline flourished. Student, religious, indigenous, labor union, environmental justice and civil rights groups all got involved—and they enlarged the discussion beyond the pipeline.

Landowners in Nebraska and Texas fought the pipeline in the courts by challenging TransCanada's use of eminent domain. Environmentalists used civil disobedience in a way not seen since the 1960s and '70s, chaining themselves to construction equipment along the pipeline's route and at dozens of fossil fuel projects around the globe. Other demonstrators swarmed Washington, D.C. and state capitols in protest of oil and gas drilling and climate inaction. Pastors began preaching about climate change from the pulpit. McKibben's "Do The Math" initiative spurred a debate about how much oil and gas the world must leave in the ground to keep global warming below 2 degrees Celsius. And 350.org's divestment campaign recruited hundreds of colleges, organizations, companies and wealthy individuals to pull their money from oil and gas stocks.

Obama's donors eventually began putting pressure on the president to reject the project. In 2013, Obama announced he would only approve the pipeline if it didn't significantly exacerbate climate change—the first climate requirement for a fossil fuel project ever. He formally rejected TransCanada's permit application on Nov. 6, saying "if we're going to prevent large parts of this earth from becoming not just inhospitable, but uninhabitable...we must act not later, not someday, but right here, right now."

"The fight against the pipeline helped reframe the climate issue as something much closer to home," said Jamie Henn, strategy and communications director and co-founder of 350.org. "It found more ways for people to plug in through hundreds of local policy fights, by blocking infrastructure in people's backyards."

Henn and others said the Keystone XL has also helped the climate movement emerge as its own unique entity—broader and more diverse than the traditional environmental movement, even though green groups still play a central role.

Obama's final veto of the Keystone XL "is a sign that the climate change issue has outgrown the environmental movement," said Adam Rome, an environmental historian at the University of Delaware. "It wasn't lobbying that won this fight; it was the constant grassroots organizing, at times trivially small and other times hundreds of thousands, and the willingness to tap into unlikely alliances."

Brune of the Sierra Club said the Keystone XL fight has changed the way the environmental movement organizes and who it partners with. It has also become more bold, he said.

"We are more willing to, and more effective at, challenging our political allies to go farther than they would typically go," said Brune. "We are not timid anymore. We've found a way to be supportive of politicians' actions that are meaningful and helpful, but also confront them when they falter."

Five weeks after President Obama rejected the Keystone XL, the U.S. and 194 other nations signed an international agreement in Paris pledging to curtail carbon emissions—and capping off a successful year for environmentalists.

With Keystone dead—at least for now—and international climate action underway, U.S. green leaders said their organizations are shifting gears to focus on stopping other local oil and gas infrastructure projects and halting drilling on public lands. Also on the agenda for 2016, tens of thousands of activists in countries across the globe are expected to participate in civil disobedience in May to encourage nations to "Break Free from Fossil Fuels," as well as a growing divestment campaign. They are also leading calls for an investigation into whether ExxonMobil and other oil companies purposefully misled the American public on climate change, following reporting by InsideClimate News and the Los Angeles Times.

Environmental groups are also trying to make climate change a major issue in the 2016 presidential campaign.

"In some ways it is easier to learn lessons from success than from failure," said Rome. "I hope people will take a step back and think what have they been doing right to earn these wins that no one thought possible, and how can they continue and expand on those strategies."

The movement, while expanded and bolstered, still has room for improvement, said Kleeb, founder of Bold Nebraska.

"The environmental community for so long focused on organizing the people who already agreed with them, and ignored those who didn't," Kleeb said. "You have to get out of DC and away from the coasts. You really need to dig into the community, invest time and resources into local leaderships to build long-term momentum. The people in DC have made progress, but are still learning that lesson."