The UK, alongside the Government of Gibraltar, has published a draft treaty with the EU that outlines the arrangements for a "fluid border" for people and goods.
The deal will mean no routine passport checks at the Spain-Gibraltar border for the 15,000 people who cross it every day, around half of Gibraltar's workforce.
However, checks will apply to those arriving by air, so those flying into Gibraltar from the UK will face dual border controls: one check from Gibraltarian officials and another by the Spanish on behalf of the EU, similar to French police operating at London's St Pancras Station.
There will also be a bespoke customs model to "eliminate burdensome goods checks" at the land border, the UK Government said.
The draft agreement does not affect sovereignty, stating that nothing signed "shall constitute the basis for any assertion or denial of sovereignty" over the Rock, and protects UK autonomy of key military facilities.
Gibraltar's airport is run by the Ministry of Defence and hosts an RAF base. The overseas territory also has an important naval facility.
The treaty, published in draft form on Thursday, still needs to be signed, ratified an implemented. It is set to be signed in March.
Foreign Office minister Stephen Doughty said: "This treaty ensures that Gibraltar's economy, people, and future are protected as an integral part of the British family.
"Working closely with the Government of Gibraltar - and agreeing nothing without their consent - we have a treaty that preserves sovereignty and delivers certainty when Gibraltar's way of life was threatened."
Speaking in the House of Commons Mr Doughty emphasised that Gibraltar is "not joining Schengen" and that "immigration, policing and justice remain the responsibility of its own authorities".
Chief minister of Gibraltar Fabian Picardo said: "This is a safe and secure agreement we have negotiated alongside the UK and that unequivocally protects our position on sovereignty, safeguards our economy and delivers the certainty our people and businesses need.
Gibraltar was ceded to the UK by Spain under the Treaty of Utrecht in 1713 and the population is heavily in favour of remaining a British overseas territory.
The last time it voted on a proposal to share sovereignty with Spain, in 2002, almost 99 per cent of Gibraltarians rejected the move.
Talks on rules governing the border have been ongoing since Britain left the European Union in 2020.