Madrid has expressed solidarity with London in the wake of the attacks, with a special changing of the royal guard.
London bombings brought back bad memories for many in Madrid
The British and Spanish national anthems were played at the ceremony, attended by the UK ambassador and hundreds of local people.
The attacks on London reopened wounds in the Spanish capital, which lost 191 people in last year's train bombings.
Then, London dedicated the changing of guard outside Buckingham Palace to the Madrid victims.
At the Oriente's Palace in Madrid on Wednesday, the guards observed a minute's silence in memory of the victims of the attacks in London, where at least 52 people died.
Afterwards, the crowd clapped in tribute.
A Royal Guard official, addressing the crowd by megaphone, told them: "Solidarity and grief unites us against barbarism."
UK Ambassador Stephen Wright said: "The British public is very moved and impressed by the shows of solidarity and support from the Spanish in these moments of grief."