Voting has ended in Spain's general election overshadowed by claims that al-Qaeda carried out Madrid's bomb attacks that killed 200 people.
Wounded Cayetano Abad voted to show "we cannot stand idle"
Voter turnout was reported to be high with many people spurred to cast their ballots to defy the bombers.
"No group of fanatics will prevent us from living in freedom," Prime Minister Jose Maria Aznar said casting his vote.
The claim came in a videotape by a man identifying himself as al-Qaeda's military spokesman in Europe.
Spain's Interior Minister Angel Acebes said European intelligence services had been unable to identify the man, named as Abu Dujan al-Afgani.
Before the tape's existence was made public, thousands of Spaniards took to the streets accusing the government of downplaying an al-Qaeda link for fear of losing votes.
They say the government was too swift to blame Basque separatists ahead of the election.
Spanish Foreign Minister Ana Palacio told the BBC the Basque separatist group Eta was still a strong suspect, and said police were not ruling out a possible collaboration between Eta and al-Qaeda.
Three Moroccans and two Indians are being held for the attacks.
Germany has called an urgent meeting of EU interior ministers to discuss the situation.
Polls opened at 0900 local time (0800 GMT), and queues formed almost immediately.
Reuters news agency said that by 1400 local time (1300 GMT), turnout had reached 39.5% - higher than the 35.5% at the same stage in the 2000 election.
Black ribbons hung from polling booths and voters' lapels. Most voters at polling stations near the attack scenes spent a few moments at candle and floral shrines laid out for the victims.
Voters near bomb scenes visited candle shrines to the victims
Cayetano Abad, one of the 1,500 wounded in last Thursday's attacks, was driven to a polling station in an ambulance.
"I've come to show that everything carries on, that we cannot stand idle," he said, bandaged and wearing a neck brace.
The BBC's Katya Adler in Madrid said tensions are high as people decide which political party should take the country forward in the wake of the attacks.
She said heated arguments broke out in polling stations across the city, and the debates continued at newspaper stands, cafes and on street corners.
In some cases, police were called to keep the peace.
Some voters said they stayed up all night listening to the radio, hoping to glean some information to decide which way to vote.
Duty to vote
Our correspondent says the one issue people in Madrid seem to agree on is that it is their duty to vote.
Many people admitted they had not planned to vote until the bombings.
"I have two friends who have never voted in their lives and they're going to vote in this one," said 41-year-old businessman Carlos Bermudez.
Mr Aznar and his wife were booed and jostled as they arrived to cast their votes in central Madrid an hour after polling began.
As he tried to address supporters, the outgoing prime minister was drowned out by cries of "manipulators", "liars" and "peace".
"I want to say that whoever they may be, wherever they may come from, we will never allow the terrorists, the fanatics who want to finish and subjugate Spanish society, to divide it and destroy our freedoms, to do that," he said.
Mariano Rajoy - who is to succeed Mr Aznar if their Popular Party (PP) is returned to office - was also forced to find cover after youths hurled abuse as he turned up to vote.
The videotape was found in a litter bin on Saturday following an anonymous tip-off to a Madrid television station.
In the video, a man speaking Arabic with a Moroccan accent says the attacks were revenge for Spain's "collaboration with the criminals Bush and his allies".
The Spanish government backed the US-led invasion of Iraq last year despite polls showing 90% opposition to it from the Spanish public.