MADRID (AP) -- Voters in Spain braved soaring summer temperatures to vote Sunday in a general election that could make the country the latest European Union member to swing to the political right.
The Interior Ministry said turnout was 40% at 2 p.m., 2.5 points more than in the last elections in November 2019.
Prime Minister Pedro Sánchez called the early election after his Spanish Socialist Workers Party and its far-left partner, Unidas Podemos, took a severe beating in local and regional elections in May. Sánchez has been premier since 2018.
Polling stations for the 37 million voters close at 8 p.m. (1800 GMT). Near-final results are expected by midnight.
Most opinion polls 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.
A PP-Vox government would mean another EU member has moved firmly to the right, a trend seen recently in Sweden, Finland and Italy. Countries such as Germany and France are concerned by what such a shift would portend for EU immigration and climate policies.
Spain's two main leftist parties are pro-EU participation. On the right, the PP, led by Alberto Núñez Feijóo, is also in favor of the EU. Vox, headed by Santiago Abascal, is opposed to EU interference in Spain's affairs.
The election comes as Spain holds the EU's rotating presidency. Sánchez had hoped to use the six-month term to showcase the advances his government had made. An election defeat for Sánchez could see the PP taking over the EU presidency reins.
Sánchez was one of the first to vote, casting his ballot in a polling station in Madrid.
Commenting later on the large number of foreign media covering the election, he said: "This means that what happens today is going to be very important not just for us but also for Europe and I think that should also make us reflect."
"I don't want to say I'm optimistic or not. I have good vibrations," Sánchez added.
The Socialists and a new movement called Sumar that brings together 15 small leftist parties for the first time hope to pull off an upset victory. Sumar is led by second deputy prime minister Yolanda Díaz, the only woman among the top four candidates.
Díaz called for everyone to vote, recalling that the freedom to vote didn't always exist in Spain.
"A lot is at risk," said Diáz after voting. "For people of my generation, they are the most important elections."
At stake is "waking up tomorrow with more rights, more democracy and more freedom."
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.
For poll favorite Feijóo, "It is clear that many things are in play, what model of country we want, to have a solid and strong government."
Vox's Abascal said he hoped for "a massive mobilization (of voters) that will allow Spain to change direction."
Alejandro Bleda, 45, did not say who he voted for but indicated that he was backing the leftist parties. "Given the polarization in this country, it's to vote either for 50 years of backwardness or for progress," he said.
The main issues at stake are "a lot of freedoms, social rights, public health and education," Bleda said after voting in the Palacio de Valdés public school polling station in central Madrid with his wife and young boy.
Voters are to elect 350 members to the lower house of Parliament and 208 members to the Senate.
Carmen Acero, 62, who voted for the Popular Party, compared Sánchez to Venezuelan leader Nicolás Maduro and said she voted because "to continue with Pedro Sánchez is hell."
Acero, who sported a Spanish flag on her phone, accused Sánchez of being an "assassin" for allying with the small Basque regional party Bildu, which includes some former members of the now-defunct armed separatist group, ETA.
She identified "the unity of Spain, employment and security" as among her main concerns.
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.
The government said that all polling stations were up and running as normal.
A fire in a tunnel forced the suspension of all trains entering and leaving the eastern city of Valencia, indicating many people there might not make it to their voting station.
Coming on the tail of a month of heat waves, temperatures are expected to average above 35 degrees Celsius (95 degrees Fahrenheit) and to rise between 5 and 10 degrees Celsius above normal in many parts of the country Sunday. Authorities distributed fans to many of the stations.
"We have the heat, but the right to exercise our vote freely is stronger than the heat," said Rosa Maria Valladolid-Prieto, 79, in Barcelona.
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 keep 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 of which have benefited millions of citizens and thousands of companies.