MADRID — Polling began Sunday in Spain in a general election that could make the country the latest European Union member to swing to the political right.

Prime Minister Pedro Sánchez called the early election after his Spanish Socialist Workers’ Party and its far-left partner, Unidas Podemos, took a beating in local and regional elections in May. Sánchez has been premier since 2018.

Most opinion polls for Sunday’s voting have put the right-wing Popular Party, which won the May vote, ahead of the Socialists but likely needing the support of the extreme right Vox party if they want to form a government.

Such a coalition would return a far-right force to the Spanish government for the first time since the country transitioned to democracy in the late 1970s following the nearly 40-year rule of dictator Francisco Franco.

Opposing them are the Socialists and a new movement called Sumar that brings together 15 small leftist parties for the first time ever.

With no party expected to garner an absolute majority, the choice is basically between another leftist coalition and a partnership of the right and the far right.

Polling stations for the some 37 million voters opened at 0700 GMT and will close at 1800 GMT. Near-final results are expected by midnight.

The election takes place at the height of summer, with millions of voters likely to be vacationing away from their regular polling places. But postal voting requests have soared, and officials have estimated a 70% election turnout.

Sánchez’s government has steered Spain through the COVID-19 pandemic and dealt with an inflation-driven economic downturn made worse by Russia’s invasion of Ukraine.

But his dependency on fringe parties to his minority coalition afloat, including separatist forces from Catalonia and the Basque Country, and his passing of a slew of liberal-minded laws may cost him his job.

The right-wing parties dislike everything about Sánchez, saying he has betrayed and ruined Spain. They vow to roll back dozens of his laws, many which have benefited millions of citizens and thousands of companies.

The election takes place at the height of summer, with millions of voters likely to be vacationing away from their regular polling places. But postal voting requests have soared, and officials have estimated a 70% election turnout.

Coming on the tail of a month of heat waves, temperatures are expected to average above 35 degrees Celsius and to rise between 5 and 10 degrees Celsius above normal in many parts of the country Sunday.

Spain’s 36 million voters will be able to cast their ballots between 9 a.m. and 8 p.m. (0700 and 1800 GMT), with near-final results expected by midnight.