Spain's conservative People's Party (PP) is set to win the most seats in a tightly fought election but will need the support of the far-right Vox to form a viable government, opinion polls project.
If Vox were to join a PP-led government, it would be the first far-right party in western Europe to be part of a governing coalition - and the first time a far-right party has been in power in Spain since the Franco era.
The survey, as well as an exit poll, suggest Spain's Socialist Prime Minister, Pedro Sánchez will leave office after eight years in power, a time in which he has become a vocal critic of the Trump administration's policies in the Middle East and of the power of US social media companies.
Sánchez called an early election in an apparent effort to seize the initiative following nationwide protests over a housing crisis sparked by the eviction of a 87-year-old woman in Madrid.
He said he needed a mandate after parliament rejected decrees to address the housing issue.
But Sánchez's socialist party has suffered several setbacks in regional elections this year, and corruption scandals involving close associates have also tarnished its reputation.
Some recent polls showed the Socialist Party (PSOE) closing the gap with the PP, but at the expense of a disillusioned far left, whose support Sánchez would need to form a government.
A survey for Spain's public broadcaster RTVE, based on 19,500 interviews over the last two weeks, indicated the People's Party would win between 131 and 136 seats — and Vox between 44 and 48.
If that is the case, the two parties combined would win between 175 and 184 seats. They need 176 seats for a majority in the 350-seat lower house.
The Socialist Party was forecast to win 119-124 seats, while the hard-left Broad Front was likely to win about 10 seats. Regional parties will pick up most of the remaining seats.
An exit poll by state broadcaster estimated the People's Party would win 32.2% of the vote; the Socialists 28.8%, Vox 16.2% and the Broad Front less than 6%.
More than 38 million people were eligible to vote in the election, and turnout two hours before the polls closed was the highest since the restoration of democracy in Spain nearly 50 years ago.
Many Spaniards saw the election as a watershed.
"These are existential elections," former prime minister and PP leader José María Aznar last Thursday.
Official results are expected to start coming in within an hour.
For more CNN news and newsletters create an account at CNN.com