With the European Union referendum looming, polls show Britain on the verge of leaving.

EU citizenship comes with significant advantages – notably the ability to live and work anywhere across the bloc.

There are also other benefits like being able to set up a business anywhere on the continent and getting full access to other countries' public services like healthcare when you’re abroad.

If Britain leaves the EU these advantages will disappear for British citizens – but there are some ways you could keep them.

Check your Irish ancestry

A man wearing an Irish flag hat t and four-leaf clover sunglasses attends a St Patrick's Day parade in Central London on March 16, 2014. Some 400,000 people are expected to line the streets of Dublin on March 17 for the annual Saint Patricks Day parade. The parade is the culmination of a weekend of festivities in the Irish capital and across the country to celebrate Irelands national holiday. (ANDREW COWIE/AFP/Getty Images)

Around 10 per cent of people living in the UK have a grandparent born in Ireland, according to census data.

If you’re one of them and want to keep your EU citizenship, you’re in luck. Ireland has very welcoming rules on granting citizenship to people with Irish heritage.

This rule applies even if your parents aren’t Irish. The rules are a bit complicated, and the first step is signing to up to Ireland’s foreign births register.

You don’t need to actually move to Ireland to become a citizen but your Irish passport will by extension make you an EU citizen and give you freedom of movement across all EU countries.

Ireland also recognises dual citizenship so you don’t have to give up your British passport. More information can be found here.

Other countries have similar ancestry schemes, so check the policies of your parents' and grandparents' homelands.

What to believe about the EU referendum

Use Estonia’s e-residency programme

The internet has revolutionised travel (AFP/Getty)

Estonia made waves in technology circles in 2015 when it launched its so-called “e-residency” programme.

People living anywhere in the world can sign up over the internet to receive an Estonian government ID and gain a special category of residency.

This scheme doesn’t give you Estonian citizenship or even proper rights to live in the country – but there are some advantages.

If you’re worried about losing your European Union citizenship for business reasons, you can use the e-residency to set up an Estonian company.

This will by extension be an EU company and allow you to trade in all EU countries.

You don’t have to actually physically go to Estonia to do it and you can administer your Estonian company from anywhere in the world – including the UK. More information can be found here.

Pay Cyprus two million pounds

Some pro-Remain companies previously advocated joining the euro (Getty)

If you’re really keen on keeping your EU citizenship and have an absolute ton of cash to spare, Cyprus may be the place for you.

The EU island nation of a million people is ready and willing to grant you Cypriot and EU citizenship – at a price.

Under the Naturalization by Exception programme, the Cypriot government will nautralise you as a citizen if you help them out with their budget.

A purchase of 2.5 million euros in government bonds will do, as will the purchase of similarly priced financial assets in the country, or contributions to major infrastructure projects.

No actual residency is required to take advantage of the scheme, but you’ll become an EU citizen.

Malta also has a similar, lower priced, scheme though it recently relented under EU pressure and now requires one year of residency to gain its citizenship. You can also become a citizen by owning property on the island.

Marry an EU citizen from another member state

Newlyweds walk among blooming lavender in Cheshire (Getty Images)

If your partner is from another EU country you might be worried about losing your EU citizenship.

Whether that’s because you’re won’t be able to settle down in their home country or that they might get sent home, it’s worth checking what effect getting married might have.

Most EU countries have more relaxed laws for gaining their citizenship if you’re married to one of their citizens compared to if you just turn up there by yourself.

Some countries like the Netherlands and France don’t require you to actually live in their country to apply for citizenship as long as you are married to one of their citizens for a few years (and everything is registered properly).

After that period has elapsed, even if you’ve never visited, you’re elegible. For instance, if you get married to your Dutch partner in London the day after the EU referendum, you’ll be able to get Dutch citizenship by June 24 2019. The negotiations for leaving the EU might not even be done by then.

Other countries like Italy and Germany can require some residency to naturalise as a spouse, but this is usually significantly reduced compared to what a non-married person requires – typically around two years compared to the more usual five.

Study abroad

Top ranking universities under the new framework will be granted permission to raise tuition fees for undergraduate students (Getty)

Britain may aggressively chase international students out of the country after they’ve finished studying, but other countries actively court people they’ve spent years educating to stay and contribute to their societies.

France, for instance, normally requires someone to be a resident for five years before they can become a French citizen.

This is however cut to two years if you study at a French university for two years.

This effectively means that if you take that Masters degree you’ve always wanted to do in France, you’re on your way to naturalization and EU citizenship.

As an EU citizen (for now) British citizens are currently entitled to study at French universities as if they were a home students. Fees there are typically counted in the hundreds of euros rather than thousands of pounds typical of British universities.

Some French courses are even taught entirely in English, though it isn’t the most Anglophone friendly country in Europe.

Some other countries have similar rules for retaining graduates of their universities, so it's worth looking around.

Just move to another country for five years

Passengers could arrive at Paris Gare du Nord as late as midnight (Simon Calder)

If all other options fail, the most basic route for gaining EU citizenship is to move to an EU country, stay there, and then apply for citizenship.

In most European countries, continuous residence for five years and a working knowledge of their language and culture will get you their passport.

Britain is still in the EU and the process of leaving is expected to take years. This means you’ve got some time to use your freedom of movement and move out there.

While there’s a risk that you might get sent home once Britain officially exits, it’s more likely that your new homeland will let you stay rather than actively deport you.

This approach means uprooting your entire life and leaving behind your family and friends – so it’s probably not something you’d casually consider for the sake of a passport.