In 2013, David Cameron pledged to hold an in/out referendum if the Conservatives won the 2015 general election...
In a decision that has sent shockwaves around Europe and the world, a majority of British people yesterday voted to leave the European Union.
Here is a timeline of some of the key events in the run-up to the historic vote on Britain's membership of the union.
23 January, 2013 - Under growing pressure from Eurosceptics within his own party and UKIP, Conservative prime minister David Cameron said the British people must "have their say" on Europe as he pledged an in/out referendum if the Conservatives won the election.
He said he wanted to renegotiate the UK's relationship with the EU and then give people the "simple choice" between staying in under those new terms, or leaving the EU.
18/19 February, 2015 - David Cameron secures a deal to change Britain's membership of the EU at a crucial summit in Brussels.
He claimed the reforms would give the UK "special status" in the 28 nation bloc, but Eurosceptics were dismissive of the agreement.
Boris Johnson later said the Mr Cameron had achieved "two thirds of diddly squat" in his pre-referendum negotiations with Brussels.
20 February - Following a special cabinet meeting, David Cameron announced the referendum would be held on 23 June.
It was agreed that collective cabinet responsibility would be suspended to allow ministers to campaign for Brexit - against the official government position.
Michael Gove, Iain Duncan Smith, Chris Grayling, Theresa Villiers and John Whittingdale immediately announced that they backed quitting the EU.
21 February - Boris Johnson said he had made the “agonisingly difficult” decision to back the Leave camp and rejected claims it was linked to any leadership ambitions.
9 March - The Queen of England is dragged into the referendum campaign after The Sun claimed she had expressed Eurosceptic views during a lunch with former deputy prime minister Nick Clegg.
Buckingham Palace complained to the Independent Press Standards Organisation.
The watchdog found the "Queen backs Brexit" headline was "significantly misleading" but the newspaper rejected the ruling and insisted it had not made an error.
On the eve of the vote, the newspaper again featured the monarch on its front page as part of its support for the Leave campaign.
It, along with several other newspapers, reported the revelation by royal biographer Robert Lacey that the queen had asked dinner guests: "Give me three good reasons why Britain should be part of Europe."
7 April - The British government revealed it was to spend more than £9m (around €11m) of public money on sending a leaflet to every UK household setting out the case for remaining in the European Union, sparking a furious backlash from Leave campaigners.
15 April - The official referendum campaign kicked off with both sides holding events and rallies across the country.
It signalled the start of spending limits and rules for the official campaigns - Vote Leave and Britain Stronger in Europe.
22 April - During a visit to the UK, US president Barack Obama said Britain would be "in the back of the queue" for a trade deal if it left the EU.
Hitting back at the intervention by the American leader, Mr Johnson described him as "part-Kenyan", leading to accusations of "dog-whistle racism".
12 May - Bank of England governor Mark Carney was strongly criticised by Eurosceptics after issuing a stark warning of the threat to the economy of Brexit, which "could possibly include a technical recession".
13 May - Mr Carney's concerns were echoed by the International Monetary Fund (IMF) chief Christine Lagarde, who said a UK vote to split from the EU would have "pretty bad, to very, very bad" consequences, and expected to see interest rates "rise sharply".
Vote Leave said the IMF had been wrong in the past and was "wrong now".
15 May - Boris Johnson drew condemnation for comparing EU ambitions to create a single European state with the aims of Adolf Hitler.
20 May - Hundreds of celebrities, including Benedict Cumberbatch, Bill Nighy, Kristin Scott Thomas and Keira Knightley, declare their support for staying in the EU.
David Beckham also later gave his backing to the Remain camp.
However, the Leave campaign highlighted the support of stars for its cause, including Dame Joan Collins, comedian John Cleese, actor Michael Caine and cricketer Ian Botham.
26 May - Pro-Brexit campaigners seize on data released in May that showed net migration to the UK rose to 333,000 in 2015 - the second highest figure on record.
The figure for EU-only net migration was 184,000, equalling its record high.
Boris Johnson said David Cameron had been "cynical" to promise to bring net migration down to below 100,000 while the UK remained part of the EU.
27 May - Four weeks out from the vote, the official purdah period started, barring civil servants from providing information on the referendum that could sway the public and influence the way that they vote.
Central government and local authorities were also forbidden from publishing material related to the vote.
Both the Remain and Leave campaigners are accused of making "misleading" claims in the referendum battle by the cross-party Commons Treasury Select Committee.
6 June - Conservative former prime minister John Major ramps up his criticism of the Leave campaign branding it "squalid" and savages "court jester" Boris Johnson.
7 June - The official deadline to register to vote in the referendum. However, following a last-minute rush to register that caused the UK government website to crash, this was extended by 48-hours taking the deadline to midnight on 9 June.
15 June - UKIP leader Nigel Farage and rock singer Bob Geldof were involved in one of the more bizarre encounters of the campaign when a Leave flotilla was met by rival Remain boats on the River Thames. The slanging match saw Geldof shout "You are no fisherman's friend" across the water.
16 June - Labour MP Jo Cox dies after being shot and stabbed outside outside an advice surgery in her Batley and Spen constituency.
The killing of the mother-of-two and Remain campaigner, cast a deep shadow over the final week of the campaign, with both sides suspending activities in the following days. The tone of the debate also remained largely subdued once campaigning restarted.
The attack on Mrs Cox came just hours after Nigel Farage had unveiled a controversial poster showing migrants queuing to get into the EU under the slogan Breaking Point.
The poster was roundly condemned by politicians from both sides, and in his tribute to Mrs Cox, her friend the Labour MP Stephen Kinnock warned that "rhetoric has consequences".
Mr Farage insisted the "isolated, horrific incident" had nothing to do with the arguments in the referendum campaign.
22 June - David Cameron told Sky News his friend and cabinet colleague Michael Gove had "lost it" after he compared economic experts warning about the impact of Brexit to the Nazis smearing Albert Einstein in the 1930s.
23 June - Voters went to the polls in the historic referendum on whether Britain should stay part of the EU.
24 June - The result is announced - Britain has voted for a Brexit.
David Cameron announces he will step down as prime minister before October.