The United Kingdom's exit from the European Union hit another stumbling block this week, this time over the tiny peninsula of Gibraltar, which sits on the southern tip of Spain.

Gibraltar, a British overseas territory, is set to leave the EU with the U.K.

Spain has always maintained a claim to Gibraltar, despite ceding it to the British 300 years ago.

Ahead of an EU summit meant to endorse the Brexit withdrawal agreement on Sunday, Spanish Prime Minister Pedro Sanchez had said his country will vote "no" on the deal unless the fate of Gibraltar is clarified.

On Saturday, Spain agreed to support the Brexit plan after the British government made some concessions on matters relating to Gibraltar. But the peninsula's post-Brexit fate is a long way from settled.

With the help of Andrew Canessa, professor of sociology at the University of Essex, Day 6 put together a guide to help answer some of the main questions about the situation in Gibraltar.

What does Friday's agreement between the U.K. and Spain mean for Gibraltar?

​While it appears likely that there will be some recognition of Spain's role in negotiations that specifically relate to Gibraltar, "I would be surprised if the text were not vague and open to various interpretations," said Canessa.

So the talks, and the tension, will continue.

British Prime Minister Theresa May has said she would negotiate a Brexit withdrawal agreement that works for all of the U.K., including Gibraltar. (Matt Dunham/Associated Press)

Gibraltarians are British, with close economic ties to Spain. How has this arrangement worked for them so far?

Very well, actually.

Spain joined the EU on the promise that it would open its border with Gibraltar, giving the peninsula access to European markets. Thousands of people commute between Spain and Gibraltar on a daily basis for work.

Being a part of the British Empire has meant economic and political protection for Gibraltar as well, according to Canessa.

"Gibraltarians had enjoyed ... higher wages and been protected from the vicissitudes of Spanish politics," Canessa told Day 6 host Brent Bambury.

Gibraltar is a peninsula, approximately 4.2 kilometres square, that sits on the southern tip of Spain. (Google Maps)

How might Brexit change that?

As a part of the EU, the U.K. has protected Gibraltar's interests, economically and otherwise. It will no longer be able to do so after Brexit, Canessa said.

Life could also get harder for the thousands who travel between Spain and Gibraltar on a daily basis if Spain decides to put up a border or make crossings difficult, Canessa said.

"This has happened before," he said, adding Spain shut the border in the '60s before reopening it in the '80s.

"Since then, on various occasions, [Spain has] made it very, very difficult to cross."

Even a temporary closure of the border could have a devastating impact on Gibraltar's economy, Canessa added.

Why is Spain uneasy over what Brexit will mean for Gibraltar?

Spain ceded Gibraltar to the British in the 1700s, but it has always maintained its claim on the peninsula.

If Gibraltar leaves the EU with the U.K. without any qualifiers, that would amount to Spain giving up its claim on the contested territory.

While Madrid had initially said it would not use the Brexit process to make claims of sovereignty on Gibraltar, Canessa says there appears to be a change of mind over that.

Spanish Prime Minister Pedro Sanchez has reportedly endorsed a last-minute deal relating to Gibraltar after Brexit. (Fernando Alvarado/EPA-EFE)

Why are both the U.K. and Spain so invested in the fate of this tiny place?

"It's not easy to understand, because there's a lot of emotion rather than pragmatics involved," said Canessa, who is from Gibraltar and does research on the peninsula.

He explained that for the U.K., Gibraltar, an overseas territory full of loyal British citizens, is an example of what was lost.

"There is a very clear empire nostalgia element to Gibraltar," he said.

In Spain, on the other hand, the loss of Gibraltar is a national outrage amounting to "a scar across the landscape."

Canessa added that the Gibraltar issue is a low hanging fruit for Spanish politicians looking to get votes because most Spaniards instinctively believe Gibraltar should be Spanish.

How do Gibraltarians feel about all of this?

Many people are very anxious, said Canessa.

Spain's recent move to protest the Brexit withdrawal agreement over Gibraltar is fuelling pre-existing mistrust toward Spain on the peninsula, he said.

To hear the full interview with Andrew Canessa, download our podcast or click the 'Listen' button at the top of this page.