The idea of a Green New Deal first sprouted in the U.S. — which is only fair, since we did the first New Deal, after all. Depending on the results of this weekend’s elections, though, Spain might be the first country to actually put one into place.

The Spanish Socialist Workers’ Party, or PSOE, took over at the national level last summer following a corruption scandal that hobbled longtime Prime Minister Mariano Rajoy and his right-wing Popular Party, the PP. PSOE struck a tenuous bargain with the country’s regional nationalist parties, allowing party leader Pedro Sánchez to become prime minister. That agreement fell apart over budget negotiations earlier this spring, forcing Sánchez to call for a snap election that will take place on Sunday. PSOE is ahead in the polls and could potentially form a government with the left populist party Podemos, formed in 2014 out of Spain’s Occupy Wall Street-esque 15-M movement. Should PSOE remain in power, Spain — Europe’s fifth-largest economy — could become a testing ground for rolling out a Green New Deal nationwide.

Sánchez came out in support of the U.S. Green New Deal — sometimes translated as “El New Deal Verde” or “El Green New Deal de España” — in January and has campaigned on it throughout the election. Teresa Ribera, Spain’s minister for ecological transition, told me by phone earlier this month that a Green New Deal “accepts that we are in an emergency moment where we need to transform,” calling it an “opportunity to update our economy and our industry.” She sees it, too, as an opportunity to draw vital connections between income and wealth inequality and the degradation of the environment, “transforming that into a positive agenda.”

While acknowledging that she faces a learning curve in figuring out how to put policies in place, Ribera praised Rep. Alexandria Ocasio-Cortez’s leadership on the Green New Deal. “One of the main elements of her speeches that we fully share,” Ribera said, is that “we cannot have sectoral environmental and social agendas. Climate justice and the recognition of climate injustice is very important.”

Ribera was secretary of state for climate change the last time PSOE was in power, from 2008 to 2011. In the midst of a global financial crisis that hit Spain especially hard, making progress on any progressive policy front became tremendously difficult. “The ways out of the crisis mean another view of the macroeconomic figures and forgetting about the people,” she told me. “The consequence is that the new economy and the social agenda get lost.”

With the economy now on a stronger footing, PSOE hopes that this time can be different, especially on climate. They’ve already made some inroads. Soon after taking office last June, Ribera moved to repeal the “sun tax” — an anti-solar levy put in place by the PP that stymied renewables development — and pledged to bring more renewables online. She worked as well with trade unions to set up a just transition for coal workers, as Spain shudders its last mines. The crux of PSOE’s climate plans is embodied in a sweeping new climate law the party proposed before this election was called, and which shares plenty in common with Green New Deal plans here in the U.S.: reducing emissions by 90 percent below 1990 levels by mid-century and generating all of the country’s power from renewables along the same timeline; 74 percent of power would come from renewables by 2030. The bill would ban fracking nationwide, eliminate fossil fuel subsidies and government investments in fossil fuels, and phase out fossil-fueled vehicles, with the aim of banning the registration and sale of carbon-emitting vehicles by 2040. As outlined in the party’s recently released 110-point manifesto, the overall goal of Spain’s Green New Deal is an economy-wide mobilization involving participation from local communities, civil society, unions, and businesses, with an industrial policy that treats decarbonization as an engine of job creation. The manifesto further outlines building out sustainable public transit and a zero-waste strategy.

PSOE’s plan, Ribera said, “connects to all the fundamentals of modern society. We cannot get as big a transformation as we need without big dose of just transition and solidarity policies. Otherwise there will be many people who are left behind.”

Her Ministry for Ecological Transition, a new office that merges the previously separate energy and environment ministries, is about more than just overcoming some of the intra-governmental bureaucratic hurdles that stymied climate action in the past. As Ribera tells me, her office is also meant to be a “facilitator” of the country’s climate agenda across agencies so that it becomes an “increasingly coherent” part of overall government policy.

Podemos has come out strongly in support of a Green New Deal, as well. “We recognize that if the climate were a bank, it would have already been bailed out,” Podemos says in a recent video on the subject, calling for “an economic and social transformation that puts the breaks on climate change.” As part of that agenda, Podemos leader Pablo Iglesias is pushing to form a nationwide, renewables-based public electric utility that can compete with the country’s biggest power providers — an idea rolled out at the local level last summer in Barcelona by the city’s Podemos-affiliated government, led by housing organizer turned mayor Ada Colau. Both Podemos and organizations like Greenpeace are pushing for PSOE’s climate plans to be stronger still, integrating more ambitious targets for decarbonization and fossil fuel phase-outs.