The mob could be heard chanting 'Spanish' as they waltzed into the British territory - with EU officials hailing the 'historic' day

Hordes of people waving Spanish flags have charged into Gibraltar after border police opened the gates to the Rock to the EU.

The crowd entered the British territory from the Spanish side after UK and EU representatives put pen to paper on a new treaty in Brussels to resolve the post-Brexit relationship between the EU and Gibraltar.

After Britain voted to leave the EU, a hard border was supposed to come into effect between Spain and Gibraltar, sparking fears for thousands of Spaniards who enter the peninsula for work daily.

After the clock struck midnight on Tuesday night, Gibraltar's Chief Minister Fabian Picardo shook hands with Juan Franco, the mayor of La Linea de la Concepcion, which lies on the Spanish side of the border.

After the pair embraced, border officials stood down from their post and the gates were left open to anyone who wished to enter.

Then, floods of people travelling in both directions started freely crossing into the other side unchecked for the first time.

The majority of the crossings came from the Spanish side, with many seen carrying the national flag following their country's victory over France in the World Cup semi-final.

Chants of “yo soy espanol, espanol, espanol" (I am Spanish, Spanish, Spanish) could be heard from the crowd as they walked into the British territory.

However, the chant "Gibraltar espanol” - often shouted by Spanish nationalists who want to annex the peninsula - was not heard on this occasion.

Gibraltar resident Brian Brophy said he attended the ceremony to witness a historic day for the overseas territory.

The 73-year-old told The Telegraph: “I was here when Spain opened the fence and put a complete end to the siege in 1985, so I had to come down here tonight.

“But hopefully it’s a step forward - it’s time the two communities integrated.”

GIBRALTAR - READ THE LATEST:

The border gates had been shut by Spanish dictator Francisco Franco in 1969 after his regime repeatedly failed to regain control of the peninsula.

The sovereignty of Gibraltar was handed over from Spain to Britain in 1713 following the signing of the Treaty of Utrecht.

Spanish Foreign Minister Jose Manuel Albares was present at the signing in Brussels on Tuesday, describing it as “the last piece of the Brexit puzzle”.

He said the agreement “opens a new era for Gibraltar and the [Spanish] Campo de Gibraltar, one of enormous possibilities”.

EU Brexit negotiator Maros Sefcovic hailed it as "historic" after he signed the treaty with Labour's Overseas Territories Minister Stephen Doughty.

The deal sees Gibraltar become effectively embedded within the EU Schengen zone, with checks being carried out at the airport by Spanish and Gibraltarian officers.

Prior to the ceremony, Mr Picardo said it was “among the most significant days in Gibraltar’s modern history”.

The Chief Minister said: “After years of uncertainty, endurance and determined negotiation, we have secured an international Treaty that protects Gibraltar, safeguards our sovereignty and opens the way to a more secure and prosperous future.

“The frontier that has so often divided and constrained our region will now become a place of cooperation and shared opportunity.

"The daily lives of thousands of people will be made easier, our economy will be given greater certainty and Gibraltar’s future will rest on firm legal foundations.”