The Spanish government has called for joint sovereignty over Gibraltar in the wake of the UK's vote to leave the EU.
The British overseas territory of 30,000 voted overwhelmingly for remain, with 95.9% opting to stay in the union.
"The Spanish flag on the Rock is much closer than before," Spain's acting Foreign Minister Jose Manuel Garcia-Margallo said on Friday.
Gibraltar has been a British territory since 1713 but Spain continues to claim sovereignty over the enclave.
At the entrance to the Mediterranean, Gibraltar relies heavily on its shared EU border with Spain for trade.
In a radio interview, Mr Garcia-Margallo said: "It's a complete change of outlook that opens up new possibilities on Gibraltar not seen for a very long time.
"I hope the formula of co-sovereignty - to be clear, the Spanish flag on the Rock - is much closer than before."
Gibraltar's Chief Minister Fabian Picardo campaigned for a remain vote.
Julie Girling, the Conservative MEP for South West England and Gibraltar, said; "I am deeply sorry that the people of the UK have chosen this leap in the dark.
"I believe future generations will question our wisdom."
There were 19,322 votes for remain, amid a turnout of 84% of the UK voters on the enclave.
Spain continues to claim sovereignty over Gibraltar but the majority of Gibraltarians are British citizens with British passports.
The enclave is self-governing in all areas except defence and foreign policy. It is home to a British military garrison and naval base.
Gibraltarians elect their own representatives to the territory's House of Assembly and the British monarch appoints a governor.