An employee of the Ukrainian embassy in Madrid has been lightly injured while opening a letter bomb, Ukrainian and Spanish officials say.
The male employee was taken to hospital for treatment but “his life is not in danger”, said Ukrainian foreign ministry spokesman Oleg Nikolenko.
He added that Ukrainian embassies have been ordered to “urgently” increase security after Wednesday’s blast.
A Spanish bomb disposal unit has been deployed, and the area sealed off.
No-one has so far claimed responsibility for the blast in Madrid’s north-eastern Hortaleza district.
Spanish police said they received a report about the explosion at around 13:00 local time on Wednesday.
Police said the letter was addressed to the Ukrainian ambassador in Spain.
Mr Nikolenko said that whoever was behind the blast “will not succeed in intimidating Ukrainian diplomats or stopping their daily work on strengthening Ukraine and countering Russian aggression”.
Russia, which launched a full-scale invasion of Ukraine on 24 February – has not commented on Wednesday’s incident.
In separate developments on Wednesday: The EU proposed setting up a special tribunal to investigate and prosecute Russia’s “crime of aggression” in Ukraine.
At a summit in Bucharest, Nato foreign ministers voiced their support for Georgia, Moldova and Bosnia, amid fears that Russia was trying to destabilise those nations.
The ministers also said Russia’s invasion of Ukraine underlined the need to reduce economic reliance on other authoritarian regimes, including China.
The UK announced a new package of 22 sanctions targeting officials who had promoted and enforced mobilisation efforts in Russia.