The Spanish government of Pedro Sanchez can't be winning many brownie points with the British government at the moment. First, they threaten to torpedo the Brexit deal over Gibraltar and then they back the Scottish government's desire to join the European Union if Scotland ever breaks away from the United Kingdom. Theresa May had been battling an open revolt in her open party, a divided nation and opposition left, right and centre over the Brexit deal. She appeared to have weathered the storm and then enter Spain, throwing a few spanners in the works.
Now, you can say that it was just bad timing and a small spat but probably the Scottish statement is the biggest blow to May. Former prime minister, Mariano Rajoy, said at the time of the Scottish referendum that Spain would veto any attempt by an independent Scotland to join the EU. Times have changed since then, but I suspect that the Spanish statements will have caused fury in London and joy in Edinburgh.
At the moment Scotland is part of the UK and Spain’s comments are undiplomatic to say the least. I would advise Pedro Sanchez to try and resolve the problems in Catalonia and other pressing domestic matters before getting involved in domestic British matters.