The claim: Spain has more to lose in EU trade negotiations with the UK - because of its trade surplus with the UK.
Reality Check verdict: Spain sells more goods and services to the UK than it buys from the UK. It is also the top destination both for visits by UK residents and for UK nationals living abroad.
Over the weekend, former Home Secretary Lord Howard said the prime minister would defend Gibraltar the same way that Margaret Thatcher had protected the Falklands.
But on Monday, Jack Straw, the former home secretary and foreign secretary who organised a referendum on the status of Gibraltar in 2002, said the idea of conflict with Spain over the territory was absurd.
He told BBC Radio 4's Today Programme that Spain was unlikely to let Gibraltar get in the way of a future EU trade deal with the UK.
"Spain has hugely more invested in their trade and relations with the UK," he said, adding that Spain exports more to the UK than it imports from the UK, which means it has a balance of trade surplus.
The most recent figures broken down by country are from 2015. In that year:
But the UK arguably has more to lose than Spain on the issue of nationals living in the other country, because there are many more British nationals living in Spain than there are Spanish nationals living in the UK.
Of an estimated 900,000 British citizens who live in the EU, the largest number of them, by individual country, live in Spain: 308,805. Of those, 101,045 are aged 65 and over.
About 132,000 Spanish nationals live in the UK.
Read more from Reality Check
A clause about Gibraltar in the EU document outlining the negotiating strategy for Brexit has raised the question of sovereignty over the territory.