Theresa May has warned the European Union to steer clear of discussions over Gibraltar's sovereignty during Brexit talks.
In a meeting with European Council president Donald Tusk on Thursday, the Prime Minister insisted that the status of the Rock is not up for negotiation.
Mrs May told Mr Tusk at Downing Street that there would be no change in the current position without the consent of Gibraltar's people.
After the meeting, a No 10 spokesman said: "The PM made clear that, on the subject of Gibraltar, the UK's position had not changed: the UK would seek the best possible deal for Gibraltar as the UK exits the EU and there would be no negotiation on the sovereignty of Gibraltar without the consent of its people."
The meeting followed a number of heated remarks made over Gibraltar's future during the past week.
Last Friday a row erupted when a paragraph in the European Council's guidelines for Brexit negotiations appeared to offer Spain a veto on the territory's future.
Former Conservative Lord Howard suggested that Mrs May would be prepared to defend the Rock's sovereignty in a similar vein to which Margaret Thatcher did the Falkland Islands in 1982.
Spain's foreign minister responded by saying that there was no need for countries to lose their tempers over Gibraltar.
The Prime Minister herself was even forced to play down the idea of a war between Britain and Spain, describing the issue as "jaw jaw".
But during their meeting Mrs May and Mr Tusk recognised that both sides needed to "lower tensions" when sensitive issues such as Gibraltar were discussed.
EU sources described the meeting as "good and friendly" with "positive discussions" from both leaders.
A source said: "They agreed to stay in regular contact throughout the Brexit process to keep a constructive approach and seek to lower tensions that may arise, also when talks on some issues like Gibraltar inevitably will become difficult."
Spain has a long-standing territorial claim on Gibraltar, which has been held by the UK since 1713 and currently has the status of British Overseas Territory.
Gibraltar's 30,000 inhabitants voted overwhelmingly in favour of remaining in the EU in the referendum – 96% wanted to stay – and the territory is also home to important UK military bases.