(CNN) The results are in -- the British public has voted to leave the EU. While it's a decision that comes after months of hard campaigning from both sides, it will take at least two years -- if not more -- to sort out the exit from the 28-country bloc.
The UK has been a member of the European Union (and its precursors) since 1973, and the British government now faces the gargantuan task of unraveling decades of legislation, treaties and deals between the UK and the EU, the single biggest market in the world.
The EU referendum vote itself is not a legal notification. The formal announcement to the EU is expected to happen at a meeting of the European Council (the EU's heads of government) on Monday, June 27.
Once that happens, it will trigger Article 50 of the 1973 Treaty of Rome, which gives both sides two years to reach an agreement.
However, because the UK is so intricately entwined with the EU, it could take many years longer than that.
Liam Fox, a pro-Leave British MP, estimates it would take up to 2019 to renegotiate policy from issues on immigration to trade, security and more.
What will happen to the EU?
The UK is the first bona fide country to leave. The closest thing prior to this is when Greenland, which is part of Denmark, left in 1985. (The rest of Denmark stayed.)
Greece has thought seriously about it though. That would be Grexit (another story altogether). But think about the precedent it sets. With the UK's decision to leave, other EU countries might start eyeing the door too and that'll have huge consequences for the economy and stability.
Jan Techau, director of foreign policy think tank Carnegie Europe, says the EU is sure to play hardball when it comes to negotiating the UK's exit.
"First off, they will try to play it hard vis-a-vis the UK. It's quite clear they will have to unify around a position that will make it quite painful for the UK to negotiate this exit so that everybody sees what happens to you if you try to do the same thing," Techau said.
While that's a short-term tactic, Techau said the EU will also need to find a deeper solution to the problems plaguing them such as the refugee crisis.
A breakup for the UK?
Friday's vote could also see a break up of the UK -- which is composed of four countries: England, Wales, Scotland and Northern Ireland.
Scots, a majority of whom want to stay, have said they will call for a referendum for their own independence (remember the 2014 Scottish referendum? That vote to stay prevailed by 55% to 45%) -- so it can join the EU.
Northern Ireland leaders called for a referendum too after the vote results.
"The British government can no longer claim to represent the political or economic interests of the North in Europe," Declan Kearney, Sinn Fein National Chairperson told CNN.
"There is clearly a democratic imperative for a border poll in the North."
Political fallout?
Prime Minister David Cameron, who led the "Bremain" campaign, is expected to address the nation early Friday morning about the overnight decision.
Cameron has said he will stay on but his position within his ruling Conservative party appears tenuous for backing the losing side on such a critical issue.
Leave.EU and UKIP leader Nigel Farage has called on him to resign as a result of the referendum.
"The dawn is coming up on an independent United Kingdom, something that you did your absolute best -- you used all of your powers -- to prevent," he said.
"You did it using every organ of state available to you. You've lost the trust of the British people. Go, go now."