Spain’s ruling monarch, king Felipe VI, hailed the strength of the bond between Britain and Spain on Wednesday, despite the current diplomatic tension.

The two countries can overcome their differences through “necessary dialogue” to reach an agreement on the territorial dispute over Gibraltar, he said.

In Wednesday’s prime minister’s questions in the House of Commons, Tory MP Andrew Rosindell pushed Theresa May to tell the king that Gibraltar is under British control, despite long-standing Spanish claims to the region on Spain’s south coast..

Speaking in the Palace of Westminster, the king made reference to Spain and Britain’s “profoundly intertwined” relationship.

The king mentioned the two countries’ vital trading arrangements, adding that Britain is “the second largest investor in our country”.

However, he pointed to historic complications between the two European countries.

It is just as true, however, that during our rich and fruitful history there have also been estrangements, rivalries and disputes, but the work and determination of our governments, authorities and citizens have relegated such events to the past.

On the subject of Brexit, the king shared his hope that Spanish people living in the UK would be guaranteed certain rights.

Those [Spanish] citizens have a legitimate expectation of decent and stable living conditions, for themselves and their families. I therefore urge our two governments to continue working to ensure that the agreement on the UK’s withdrawal from the EU provides sufficient assurance and certainty.

King Felipe VI is in London on the first day of a three-day state visit to the UK, the first such visit by a Spanish king to the UK since Felipe’s father, Juan Carlos, came 31 years ago.

The Queen and the Duke of Edinburgh greeted king Felipe and his wife queen Letizia in a traditional welcoming ceremony at the Horse Guards Parade in Whitehall, central London on Wednesday.