Spain's foreign minister has said his country will not block a post-Brexit agreement between the UK and European Union to push its sovereignty claim on Gibraltar.
Alfonso Dastis said Spain would not "jeopardise" any future deal by making demands to alter the British overseas territory's status.
It comes after fears that Brussels negotiating guidelines may give Spain a veto over the Rock's inclusion in any UK-EU trade deal.
Prime Minister Theresa May reacted to those suggestions by insisting Gibraltar's status was not up for discussion during withdrawal negotiations.
And Mr Dastis has told Spanish newspaper ABC: "We will try to convince the Gibraltarians that (joint sovereignty) is a route worth exploring and that it would benefit them too.
"But what I don't want to do is jeopardise an EU-UK agreement by subjecting it to a need to alter Gibraltar's status at the same time.
"I won't make an agreement between the EU and the United Kingdom conditional on recovering sovereignty over Gibraltar."
Tory backbencher Bob Neill, a member of the all party parliamentary group on Gibraltar, told the Sun: "If this is a genuine shift in the Spanish position we welcome it.
"We in the UK want to have a good relationship with Spain after we leave the EU. And the people of Gibraltar want a good relationship with Spain too."
Gibraltar's initial inclusion in European Council president Donald Tusk's draft negotiation guidelines caused fury on the Rock - which accused the EU of bullying - while former Conservative Party leader Lord Howard even suggested Mrs May could go to war to defend the territory.
Spain's King Felipe sparked Gibraltar's anger last month after saying the "two governments" of his country and Britain will find a solution on the Rock's future that is "acceptable to all involved", in an address to both Houses of Parliament during his state visit to the UK.