Speaking on Tuesday the Spanish head of state said: "I invite the UK, on this first occasion at the UN after Brexit, to end the colonial anachronism of Gibraltar with an agreed solution between both countries to restore the territorial integrity of Spain and bring benefits to the people of Gibraltar and the Spanish area of Campo de Gibraltar."
The Gibraltar government issued an immediate response accusing Spain of being stuck in the past.
"The days when territories could be handed over from one monarch to another regardless of the wishes of the people who live there ended a very long time ago," a spokesman for No 6 Convent Place told The Gibraltar Chronicle.
"This is not 1704, when Britain conquered Gibraltar, or 1713 when Spain ceded it by Treaty for ever."
"This is 2016 when what matters most is the right of a people, however small, to determine their own future."
"It is regrettable that the mentality in official circles in Spain remains stuck in the eighteenth century."
"Madrid has still not come to terms with having lost Gibraltar over three hundred years ago and it's time they realised that they are never going to get it back."
In the wake of Brexit Spain's foreign minister José Manuel García-Margallo called for negotiations to begin on a co-sovereignty agreement "to solve the situation of Gibraltar and allow it to keep its access to the EU's single market."