The 300-year-old Treaty of Utrecht, which is currently in the British Library, was signed to end the war of Spanish succession and gives Britain the right to Gibraltar.
The treaty, which was seen today by ITV News Europe Editor James Mates, says the territory is Britain's "to hold forever, without any impediment or exception whatsoever".
Despite being signed on April 11, 1713, the document remains legal.
A Royal Navy ship has sailed from Portsmouth today as part of an annual deployment to the Mediterranean and Gulf region.
The long-planned Cougar '13 deployment will see the naval force hone its world-class maritime skills through exercises with key allies.
This is the first time the deployment has taken place with its aim to demonstrate the ability to operate a highly effective maritime force anywhere in the world to protect UK interests.
Captain Mike Utley, Commanding Officer HMS Illustrious, said: "I am immensely proud of my ship and what has been achieved by everyone on board, in Portsmouth Naval Base and further afield, to get HMS Illustrious and all our embedded capabilities ready to employ today."
Two Royal Navy Warships set sail from Portsmouth today amid continued diplomatic tensions with the Spanish over Gibraltar. HMS Illustrious and Westminster will take part in a series of exercises with allies in the Mediterranean.
Spain has said it will not back down on implementing tighter controls at its border with Gibraltar after Britain announced it is considering legal action against the nation in the escalating row.
"The controls are not a right, they are an obligation," a spokesman for the Spanish foreign minister told the Reuters news agency.
He said the Spanish government believed the controls were legal and proportionate in order to stop money laundering and smuggling.
Spain is considering the possibility of raising the matter of Gibraltar with other nations, according to Spanish media reports.
Newspaper El Pais, quoting diplomatic sources, said the dispute may be put on the agenda by Spanish officials at the United Nation's General Assembly or the International Court of Justice at The Hague.
The European Commission is already understood to be due to send a team of monitors to the border between Spain and Gibraltar border in September amid the sovereignty row.
London mayor Boris Johnson has said the deployment of a British naval task force to the Mediterranean should send a clear signal to Spain, while accusing Madrid of reverting to the blockade tactics of the Franco era.
– Boris Johnson, writing in the Daily Telegraph
Perhaps it really is a coincidence - as the Foreign Office claims - that we have just sent a fleet of warships to Gibraltar.
Maybe it's just a fluke that HMS Illustrious is about to bristle into view on the southern coast of Spain, complete with thousands of Royal Marines and other elite commando units.
But I hope not. I hope that one way or another we will shortly prise Spanish hands off the throat of our colony, because what is now taking place is infamous.
– No 10 spokesman
Clearly the Prime Minister is disappointed by the failure of Spain to remove the additional border checks this weekend. We are now considering what legal action is open to us.
This would be an unprecedented step so we want to consider it carefully before a making a decision to pursue.
Prime Minister David Cameron's spokesman has confirmed Britain is "seriously considering" taking legal action against Spain over extra checks at the border with Gibraltar.
The spokesman said the tighter checks by Spanish officials, which are causing long delays, are "politically motivated and totally disproportionate".
Downing Street has said that it would be "an unprecedented step" for Britain to pursue legal action against Spain in the dispute over the overseas territory of Gibraltar.