More than 36.5 million people were eligible to vote, around 725,000 of them in the Balearics. The election is for 350 seats in Congress and 208 in the Senate.
00.30
And with that, it's time to call it a night after a very long day keeping across the election. What will be Spain's political future? The Rajoy government is, for the meantime, still the government (if only acting). The Christmas festivities are unlikely to be relaxing times for the country's politicians.
Thank you for checking in to The Bulletin's election coverage.
00.05
Mariano Rajoy is now offering his thoughts at PP HQ (where the numbers have not been great). "Thanks to you, this party remains the most voted-for in Spain."
"These have been four difficult years, but I have done what I believed was right in the interests of Spain."
"Who wins the election should attempt to form a government."
"I intend to form a government and believe that Spain needs a stable government."
"We are beginning an era that will not be easy. It will be necessary to talk and to arrive at agreements, and I intend to do that."
24.00
How will the markets react tomorrow? They might have been hoping for a better performance from the C's and a possible coalition with the PP (which they would have liked). That looks as if it's been thrown out the window now. The FT says that Spain is heading towards political instability.
23.50
Albert Rivera (C's): "We are normal people doing extraordinary things. A civil platform (which is how the C's started out in Catalonia in 2005) is today represented in the whole of Spain."
23.45
Pedro Sánchez congratulates Mariano Rajoy and the PP for being the "first force" and adds that a new era of politics has been opened in Spain with a new process of dialogue, one which PSOE is willing to debate.
23.05
Pablo Iglesias: "Today a new Spain has been born."
23.00
In Majorca, Antoni Verger of Més says that the party has achieved more than four years ago but that this hasn't been sufficient. He reckons the party was 2,000 votes short of securing him a seat in Congress. The Balearic representation will be PP three, PSOE two, Podemos two and C's one.
22.55
Soraya Saenz de Santamaria, the vice-premier, says that the PP "has won the election", because it has the most votes. True, it does have the most votes, but how can it now govern? Where might a pact come from? Might Rajoy try to form a minority government?
22.45
91% counted, and it's the PP with 122, PSOE 91, Podemos 69, C's - going up - on 40. The regional and minor parties might now come into the equation where a future government is concerned, but there will have to be a hell of a lot of bargaining to get some sort of Congress majority. It's very hard to see where this might come from.
22.00
Almost 70% counted, the turnout has been bumped up to 73%, and the PP is now projected to get 124 seats. PSOE 93, Podemos 68 and the C's 36. In the Balearics, the PP is looking at three seats in Congress (two fewer than in 2011), PSOE two (one down), Podemos two and the C's one. With almost 75% of the Balearic vote in, Podemos will be the second most voted-for party with almost 23% share of the vote.
21.30
Turnout has been 72.63%. 35% of the vote counted (sorry had put the wrong end time), and the PP are forecast to get 120 seats, PSOE 96, Podemos 68 and the C's 31. Which would be better than the opinion polls had things for PSOE, better also for Podemos and very much worse for the C's.
21.00
Exit poll suggests that in the Balearics there will be two to three seats for the PP and Podemos, two for PSOE and one the C's. There are eight on offer. Nothing, therefore, for either Més or El Pi.
20.50
Podemos apparently likely to come first in the Basque Country and Catalonia; second in Madrid. The shock is starting to reverberate.
20.45
Pablo Casado, PP spokesperson: "The polls show that the PP remains the preferred force among the people of Spain; it will be the force that has won the general election.
José Manuel Villegas, C's spokesperson: "What was claimed could be a historic day seems to have been. A new political space has opened in Spain's democracy. The political centre has been opened thanks to Ciudadanos."
20.30
Reminder - 176 seats are required for an absolute majority. Even were a PP-C's coalition ever a goer, it may be that they can't combine to create a majority.
20.25
Exit poll for Antena 3 gives the PP 121-124, PSOE 79-83, Podemos 70-74, C's 46-50. The C's are looking at a disappointing result and Podemos at causing a greater shock than most had thought they would.
20.15
Exit poll for RTVE gives the PP with 114-118 seats, PSOE with 81-85, Podemos with 76-80, Ciudadanos with 47-50.
If so, then the opinion polls have been wrong where Podemos and the C's are concerned, as Podemos were being ranked behind the C's with some 30 fewer seats than this exit poll suggests, while the C's were higher.
In 2011, the PP won 186 seats out of 350 and PSOE had 110, which was a loss of 59.
20.00
Podemos: "Hope, optimism and much desire."
Pedro Sánchez (PSOE): "We've waited four years to be able to make the changes that the country needs."
PSOE denounces the ministry of the interior for sending out a photo of Mariano Rajoy next to one of Adolfo Suárez, father of democratic transition, when he voted in the first free elections in 1977 after the decades of Franco.
19.00
The turnout in the Balearics (up to an hour ago) was 52.19%, up 1.8% over 2011. Turnout has increased in many regions, Valencia having the highest (63.4%). In the south - Andalusia, Extremadura, Murcia - there seems less enthusiasm, as they are regions where the turnout is currently lower.
18.30
It's not been a mad rush, but the latest turnout announcement says that it is now up a fraction on 2011, having been slightly down at midday. Up to six this evening, the participation level is 58.29% compared with 57.65% four years ago.
18.00
Of odd stories during the day, there has been the 17-year-old who turned up and wanted to vote, only to be informed that he would have to wait until his 18th birthday in nine days time. And the mayor of Barcelona, Ada Colau, was unable to vote because she forgot her ID card. (She went home and returned later.) In the municipality of Villarroya in La Rioja, the polling station opened at 9am and closed a minute later. Very thoughtfully, all of the six eligible voters in this municipality of nine inhabitants - and yes, it does actually have a mayor - turned up together, so they could close up and head off to the nearest bar (assuming there is one).
16.00
Juan Carlos Monedero, one of the founders of Podemos: "Spring is going to begin in December."
14.45
Early figures re turnout show a slight reduction over 2011, with 36.92% participation in the five hours since the polling stations opened at nine this morning. It was 37.88% in 2011. In the Balearics, the turnout up to two o'clock was almost identical to 2011 - 35.13%, a fraction below the 35.17% four years ago.
14.00
Pablo Iglesias (Podemos): "The party has done its homework. We have done well." This is an historic election day, one to "enjoy".
13.15
Artur Mas, president (strictly speaking, acting president) of Catalonia says that he hopes that the people of Catalonia vote "with full awareness as to the decisive moment that this is for Catalonia".
13.00
Meanwhile, the nation is probably far more interested in the news that Pep Guardiola will be leaving Bayern Munich at the end of the season and be replaced by Carlo Ancelotti.
12.45
Jose Manuel Soria, the national tourism (and energy and industry) minister said after voting that the past four years have been "intense" and have made Spain better. He added that he hoped the election leaves a government which will consolidate what has been achieved. (Which sounds rather downbeat perhaps.)
12.15
National government delegate to the Balearics, Teresa Palmer, reports that everything has gone normally with the voting except in one location in Ibiza where the first voters turned up to find no one actually manning the voting table.
12.00
Pedro Sánchez (PSOE): "It is a day of change on an historic day. We are writing the future with our vote."
11.45
The Economist tweets that if it had a vote, it would go to Ciudadanos.
11.30
All the lead candidates for Congress from Balearic parties - Mateo Isern (PP), Fernando Navarro (C's), Juan Pedro Yllanes (Podemos), Ramon Socias (PSOE) plus Antoni Verger (Més) have voted - with the exception of Jaume Font (El Pi), who will be casting his vote at midday in Sa Pobla's museum.
11.15
Voting is proceeding without any incidents, says the government. There is a level-four anti-terrorism alert in place, just in case.
Mariano Rajoy calls on Spaniards to vote "freely" and with full knowledge of the facts. "It is a very important decision."
10.45
Mariano Rajoy has voted.
Albert Rivera (Ciudadanos) has voted and tweeted: "Whatever happens, whoever governs, we have managed to change this country and that is an achievement."
Pablo Iglesias (Podemos) has tweeted to thank all those who have got up today with a smile and eager to make history. Both he and Pedro Sánchez (PSOE) have tweeted to express concern with the major fires affecting Asturias, Cantabria and Galicia.