Hillary Clinton is her party’s presumptive nominee. Whether Sanders drops out tomorrow or the day he loses the roll-call vote at the Democratic convention in Philadelphia, his campaign is over.

But if ever there were a losing campaign that achieved some major wins, it’s Sanders’. Not only did he force Clinton to talk more about economic inequality, he pushed her to promise stronger action to fight climate change and rein in fossil fuel companies. If Hillary Clinton becomes president and keeps some of her more recent promises to restrict oil drilling and fracking, Sanders will deserve a share of the credit.

When Sanders first got into the race, it didn’t look like he would adopt climate change as a major issue. He was one of the strongest climate hawks in the U.S. Senate, having sponsored bills to promote clean energy, reduce carbon emissions, and end fossil fuel subsidies. But for the first few months of his presidential campaign, he did little more than make passing mention of climate change and its importance to young voters. In September of last year, I even wrote a post entitled, “Why is Bernie Sanders neglecting climate change?

Then, gradually, Sanders started to focus on the issue and develop a strong climate agenda. In October, he said at a debate that climate change is the biggest threat to national security. In November, he cosponsored new Senate legislation, the Keep It in the Ground Act, that would have the federal government stop issuing leases for oil, gas, and coal extraction on public lands and in offshore areas. In December, Sanders rolled out a climate action plan that included the “keep it in the ground” proposal as well as a carbon tax, elimination of fossil fuel subsidies, and investments in renewables. He went on to talk more on the campaign trail about climate change and related issues such as reinvesting in mass transit and cities.

By January, the Sanders campaign was using the climate issue to attack Clinton, going after her for the vague and incomplete nature of her climate plan. The two campaigns battled on Twitter over whose climate and clean energy platform was stronger. Clinton clearly felt the need to start competing with Sanders for the votes of climate hawks.

Simultaneously, climate activists from groups such as Greenpeace and 350.org were stalking Clinton on the campaign trail and asking her questions about whether she would restrict fossil fuel extraction. The one-two punch of pressure from the green grassroots and pressure from Sanders pushed Clinton leftward on a number of energy issues.

First, last fall, Clinton finally came out against the Keystone XL pipeline, shortly before Obama rejected it. She also declared that she was opposed to offshore drilling in the Arctic Ocean. And she shifted her position on fossil fuel extraction on public land, from saying it was necessary to saying she wanted to move toward an eventual ban.

As Sanders picked up steam, she gave still more ground to climate activists. In February, she voiced her opposition to offshore drilling in the Atlantic. She also moved to assuage concerns that she is pro-fracking, saying in a March debate that she wants more regulation of fracking, and that she opposes the practice in instances when the local community is against it, it causes air or water contamination, or it involves the use of secret chemicals. “By the time we get through all of my conditions, I do not think there will be many places in America where fracking will continue to take place,” she said. Clinton had, in fact, started to say some of these things more than a year earlier, but her language has grown stronger and clearer during the primaries. In fact, she’s gotten so forthright about her plans to crack down on fossil fuels that she damaged her standing in coal country when she admitted in March that her administration would “put a lot of coal miners and coal companies out of business.”

Clinton even tried to get to Sanders’ left on climate and energy issues. During another debate in March, she accused Sanders of wanting to delay implementation of President Obama’s Clean Power Plan, which will curb pollution from coal-fired power plants. (Asked afterward to give a source for that odd claim, the Clinton camp pointed to an article I wrote about executive actions the Sanders campaign said he might take to crack down on fracking, which included potentially revising the Clean Power Plan. Some experts argue that such revisions would delay it. The Sanders team responded by saying their candidate would not do anything that would significantly delay the plan.) The Clinton campaign was also critical of Sanders’ proposal to swiftly phase out all nuclear power, noting that it would likely cause an increase in emissions from coal- and gas-fired power plants.

Finally, in April, the media recognized the salience of climate change to Democratic voters and let the candidates go at it over climate change in a debate. Thanks to Sanders, there was someone to push Clinton toward stronger stances as the two sparred over who would do a better job of saving the planet.

Last month, in recognition of Sanders’ strong showing in the primaries, the Democratic National Committee allowed him to appoint five members to the party’s Platform Drafting Committee, while Clinton got to appoint six. Among Sanders’ choices was Bill McKibben, the climate activist who founded 350.org, led the charge to block Keystone XL, and calls for dramatically reduced fossil fuel extraction. (McKibben is on Grist’s board of directors.)

It may be hard now to remember how unstoppable Clinton seemed only a year ago, when she was expected to dominate in the Democratic primary race. She had nearly tied Obama in the 2008 primary and then gone on to serve as his secretary of state, enhancing her stature and approval ratings while reaching out to die-hard Obama supporters. Her name recognition and fundraising connections alone put her at an advantage so steep that other nationally known Democrats, even those being drafted to run by supporters such as Joe Biden and Elizabeth Warren, declined to challenge her. Sanders, though, jumped into the race and showed that there is a real appetite for an agenda that more aggressively tackles inequality and climate change, and stands up to corporate power, especially fossil fuel companies. Clinton has moved in his direction to woo his supporters, and the next Democratic presidential nominee will probably start from an even more progressive place on climate and energy.

As Sanders said at a Monday night rally in San Francisco, “When we began our campaign, our ideas were considered a fringe campaign and fringe ideas. That is not the case today.” Sanders lost the primary race, but he has changed the Democratic Party and the politics of climate change.