At least three men suspected of involvement with the Madrid train bombings have died in an explosion in a suburb of the Spanish capital.
Firefighters are working at the scene of the explosion
Interior Minister Angel Acebes said the blast was set off by the suspects as police closed in on an apartment in Leganes, south of Madrid.
One policeman was killed and 11 others hurt in the blast, some seriously.
Police said they had been looking for three men in connection with the 11 March attacks on trains in Madrid.
The interior ministry said the suspects who died were probably among six men for whom a judge last week issued international arrest warrants in connection with the Madrid attacks.
The six include a Tunisian, identified as Sarhane ben Abdelmajid Fakhet and described as the leader of the cell.
"The special police agents prepared to storm the building
and when they started to execute the plan, the terrorists set off a powerful explosion, blowing themselves up," Mr Acebes said.
"There are three that blew themselves up, but the possibility of more is not ruled out."
The BBC's Katya Adler in Madrid says the minister refused to identify the men, but Spanish media describe them as young Islamist militants of Moroccan origin.
'Chanting in Arabic'
Mr Acebes said the police operation began on Saturday, when security officers approached an apartment in a block in Leganes.
The suspects spotted them from a window and they "started shooting from the apartment, chanting in Arabic", he said.
Police then evacuated residents in the building and the surrounding area, and cordoned it off.
A team then re-entered the apartment block, on Irene Fernandez street.
Mr Acebes said it was at that point that the suspects set off a huge explosion in the apartment that the police were seeking to search, in an attempt to resist arrest.
Mr Acebes said it was possible a fourth person had escaped the area before it was cordoned off by police.
Spanish media report that the body of a woman has been found in the apartment block's outside swimming pool.
The explosion sent a shower of shattered glass into the air and thick grey smoke billowed over the area. Frightened residents crowded onto the nearby streets.
Spain has been on high alert since the 11 March attacks
"This is a very quiet neighbourhood... But it's places like this where these people try to hide," a resident told Reuters news agency.
Neighbours said a group of North Africans had moved into the apartment about a month ago. They were rarely seen and the blinds were always drawn, the neighbours said.
Some 20 families were put up in a hotel overnight because they could not return to their damaged homes.
Police later lifted the cordon and traffic resumed, according to Spanish news agency Efe.
The operation came as part of the investigation into the 11 March attacks on four commuter trains in Madrid, in which 191 people were killed.
It was Europe's worst terror attack since the 1988 Lockerbie bombing.
Spain has detained 15 suspects and provisionally charged them in connection with the Madrid train blast. Six of them have been charged with multiple counts of murder, and nine have been accused of collaborating with or belonging to a terrorist
Eleven of the 15 suspects are Moroccan.
The Moroccan Islamic Combatant Group is the main focus of police investigations.
On Saturday, Mr Acebes said tests had confirmed that an unexploded bomb found on a high-speed railway line on Friday contained the same explosive as the Madrid bombs.