Spain held a general election on Sunday that could see the incumbent Prime Minister Pedro Sanchez lose power.
Sanchez called the election early after his Socialist party suffered a defeat in local elections in May, but his gamble to wrong-foot his opponents could backfire.
Opinion polls show that the election is likely to produce a win for the center-right People's Party, but the party would need to form a government by partnering with the far-right Vox party, which could enter government for the first time in 50 years.
All ballots will be counted by midnight, and the party with the most votes will form the government.
Both the left and right blocs have the potential to form coalitions, which will need at least 176 seats in the 350-seat lower house of congress.
A new parliament must be constituted by August 17, but negotiations between parties to form a government can go on for months.
An analysis of opinion poll data by Spain's El Pais newspaper on July 19 when polling ended projected a 55% chance of a People's Party/Vox coalition, a 15% chance of Sanchez staying in power with a patchwork leftist coalition, and 23% chance of a hung parliament and a repeat election.
As Sanchez went to vote in Madrid, he was greeted by small groups of people shouting "liar" and "prime minister." He told reporters he had "good feelings" about the election outcome.
Spanish voters cast their ballots amid intense heat for much of the country, and the election took place during the summer holidays.
Voter turnout stood at around 40.5% at 2 p.m. (1200 GMT), according to the Interior Ministry, up from 37.9% recorded at the same time during the last election in November 2019.
The far-right Vox party could enter government for the first time in 50 years if the People's Party forms a coalition with them.
Vox leader Santiago Abascal said that "the important thing today is whether Spain changes course," and thanked voters for "disrupting their rest" to cast their ballots.
Yolanda Diaz, the leader of the far- Spain Heads to the Polls for a Uncertain Election with Implications for EU Presidency and
COVID Recovery Funds Spain is set to hold a general election on November 13, with incumbent Prime Minister Pedro Sanchez's Socialist Party facing a strong challenge from the conservative People's Party (PP) and the far-right Vox.
Barclays has given a 50% probability to a hung parliament, where no single party can form a government, which could lead to new elections.
The political landscape in Spain has been marked by uncertainty, with the major parties reliant on smaller parties for support, which has dented the political center.
The Socialist government led by Sanchez has passed progressive laws on euthanasia, transgender rights, abortion, and animal rights, which Vox has vowed to repeal if it forms part of the next government.
The outcome of the election could have implications for Spain's role as the host of the six-month rotating presidency of the European Union Council and its spending of EU
COVID recovery funds.
A swing to the right could see the PP watering down the previous government's green agenda and taking a more conservative stance on social issues.
The voters' choices will be influenced by their views on the economy, social issues, and the handling of the
COVID-19 pandemic.
Many Spaniards are concerned about the economic effects of the pandemic and its impact on their daily lives.
The election is a crucial test for Spain, which has been grappling with political divisions, economic challenges, and social issues.
The country will be watching closely as the votes are counted to see what the future holds for Spain and its place in Europe.