"An execrable terrorist act like the one that took place today is a reminder that we face complex challenges for the security of our societies," said Rajoy in a transcript of the telegram distributed by Moncloa, the prime minister's palace.

"We must remain united against these type of threats that affect all of us equally and that know no barriers," Rajoy wrote, offering Spain's support to the UK.

Ireland: "Terror and violence will never triumph over democracy"

President of Ireland Michael D Higgins has sent a sympathy message over the Westminster terror attack.

The Irish Republic's head of state is to write to the Queen and London Mayor Sadiq Khan to express the sympathy "of the Irish people with the families of those who have lost their lives and to those who have been injured".

President Higgins said he wanted to express "the sympathy, condolences and solidarity of the Irish people with our neighbours at this difficult time".

Ireland's Foreign Affairs Minister Charlie Flanagan also extended sympathies.

"I wish to extend my condolences and on behalf of my Government, my support to the people of London and the UK. Terror and violence will never triumph over democracy," he said.

No Irish are believed to have been caught up in the attack.