A spokeswoman from the Mossos d'Esquadra, the regional police force in Catalonia where the seaside city is located, told AFP they received an alert mid-afternoon "that a woman was being held against her will inside Mali's consulate in Barcelona."
The regional force and national police officers went to the building and started negotiating with the Malian man, whose identity was not revealed.
"He wanted police to give him the necessary papers to be able to leave Spain," a national police spokesman said, adding the man had committed minor offences which meant he was not allowed out. He did not know what these offences were.
The spokesman said the woman being held was the honorary consul's wife.
After negotiating with the man, whom the police spokesman described as "calm" and unarmed, officers moved in, freeing the consul's wife and detaining him.