British Prime Minister David Cameron arrives for a meeting with the European Commission president | MMANUEL DUNAND/AFP/Getty Images Primer The EU and David Cameron: We need to talk about Brexit What you need to know as the real debate begins on Britain’s EU membership.

Three months' worth of talks between David Cameron, his fellow European leaders and the heads of EU institutions in Brussels will finally become words on paper this week, setting the stage for a dramatic summit aimed at keeping the U.K. in the Union.

Cameron's shuttle diplomacy on reforms he wants to see before Britons vote on their EU membership has been going on even longer than that. The British prime minister has been traveling the continent since his reelection in May — first to sound-out other countries on their appetite for change, and then sell them on several demands he laid out in a letter in November.

The campaign has intensified in the last few days, as Cameron has been under the gun to convince the European Commission to include his most contentious demand — a four-year ban on in-work benefits for EU migrants — in a draft agreement to be considered by national leaders meeting later this month.

Cameron wants to move quickly now and hold the referendum in June. That has made it essential for all 28 EU countries to agree at their February summit to his reforms on everything from boosting competitiveness to ensuring national sovereignty.

The longer countries bicker over the proposed changes, the reasoning goes, the stronger opposition in Britain will grow to EU membership, increasing the chances the electorate will vote to leave the Union.

Throughout the process, many EU politicians have complained about having to deal with what they say is a domestic issue that Cameron has thrown onto Europe's shoulders while they also grapple with bigger problems like the refugee crisis and financial instability in Greece.

As the debate enters its endgame, here's a look at the key questions that have brought Britain's EU membership to the brink:

Why is there even a referendum?

Cameron promised in 2013 to give the British people a chance to decide on EU membership, after he negotiated reforms that would make the EU a better deal for the U.K.. He then made following through on that pledge a central part of his successful 2015 reelection campaign.

The public debate in Britain since then has covered everything from whether the U.K. supports the goal enshrined in the EU treaties of an "ever-closer Union" to whether the bloc's guarantees of the free movement of people and labor are overwhelming the British welfare system — an argument that has proven valuable to Euroskeptic, populist politicians whose support in recent elections has grown.

"At the moment people can come here and get instant access to our in-work benefits system which is worth many thousands of pounds to people," Cameron said on Friday after meetings with Commission President Jean-Claude Juncker and Parliament President Martin Schulz. "It goes to a deeper issue which is the British people, and I, want a system where you have to pay in before you get out. We don’t want a something-for-nothing society."

British Euroskeptics — led by United Kingdom Independence Party leader Nigel Farage — blame the EU for regulatory red-tape that hinders the country's competitiveness in the global marketplace and argue that Britain would be stronger outside of the bloc.

Cameron has had to make the case for EU membership while sending the message to voters that he is still standing up for British interests in Europe. Last week he sounded almost like a UKIP member when he told the BBC he’s “very suspicious of Brussels.”

The prime minister cannot even count on the support of members of his own party, as tension between the Ins and the Outs has divided British conservatives and even Cameron's own cabinet.

The electorate wavers on the issue, with recent headlines on the EU's econonic woes and its inability to deal with the refugee crisis giving momentum to the Out forces. However, a Daily Mail poll released this weekend showed a surge in support for the In side, with 54 percent saying they would vote to stay in the EU and 36 percent saying they would vote to leave.

What's at stake?

Britain is the second largest economy in Europe, and its departure from the EU would have serious economic impacts on the Union — everything from weakening its status as a global trading partner to reducing the bloc's budget.

More importantly, a Brexit would also be a huge political and psychological blow to the EU, with one of the bloc's most important members deciding to leave at a time when it is besieged by other problems, including the migration crisis.

The consequences for Britain would be no less serious, according to In supporters. Even the Euroskeptic think tank Open Europe recently estimated that the U.K. would lose 2.2 percent of its GDP by 2030 if it leaves the EU single market.

Many foreign banks with offices in London have said they would consider relocating if Britain leaves the EU, which would result in job losses and logistical complications.

The U.K. would also have to work out its own new trade agreements with other countries if it leaves the Union. The U.S., which has long argued against a Brexit, has already warned that it is not interested in negotiating a separate trade deal with the U.K..

There would also be domestic political fallout for Cameron, who has all but staked his premiership on the outcome of the vote. And a Brexit would likely re-awaken the Scottish drive for independence, as leaders there have said they would call for another referendum on the matter as a way to remain in the EU.

What does Cameron want?

The British prime minister insists that the EU needs to change the way it does business if the U.K. is to remain in the bloc. He has grouped his demands for EU reform into four baskets:

Competitiveness: Cameron wants the European Commission to follow through on its promise to cut red tape and eliminate "unnecessary legislation" by focusing on measures that promote economic growth. Initiatives such as the digital single market, the capital markets union and a sweeping EU-U.S. trade deal are already in Juncker's agenda so they won't be points of contention in the reform package presented to EU leaders. At home, Cameron has already been selling them as promising steps toward British goals on competitiveness.

Sovereignty: Cameron wants measures to strengthen the role of national parliaments in the EU legislative process, and wants a guarantee that the Lisbon Treaty phrase "ever closer union" is not applicable to the British. Euroskeptics have interpreted the "ever closer union" language in the treaty — which the U.K. agreed to when it joined the Union and upheld in a referendum in 1975 — to mean that the ultimate goal of the EU is a federal United States of Europe, of which they want no part.

Economic governance: Protecting London's financial hub — the City — from decisions made by the bloc of countries using the euro currency has been a top priority for the U.K.'s Chancellor of the Exchequer George Osborne. Cameron wants a set of legally binding principles that protect non-euro countries like the U.K. from decisions made by euro "Ins."

Immigration: Cameron's fourth basket, on reducing the flow of workers from other EU countries to the U.K., has long been the most contentious of the Brexit issues. In his letter to EU leaders in November, Cameron sought a four-year ban on in-work benefits and social housing for EU migrants and an end to the practice of sending child benefits to other countries. Haggling over the demand has continued up until the last minute, and is likely to consume much of the summit debate later this month.

Where does the rest of Europe stand?

Eastern Europe: Many EU leaders, especially those from Eastern Europe, have argued that banning benefits for non-U.K. citizens is discriminatory and infringes against the basic freedom of movement — a founding principle of the EU. Members of the Visegrád Group of countries — Czech Republic, Hungary, Poland and Slovakia — will meet ahead of the summit to coordinate their line on Brexit. Poland has been especially critical of the demand, saying it would unfairly punish Polish workers even though they are EU citizens and calling it a "red line" issue. That sets the stage for a tough negotiation at the summit.

France: Wary of allowing the U.K. or other non-eurozone countries to have a say in decisions made by eurozone members, France sees the economic governance demand as the most troubling. "Politically it will be immediately taken that the U.K. wants to remain in the EU to block the euro," said a French official involved in the negotiations. "While Cameron says we want to have a safeguard, the euro is the strongest asset in Europe." Paris is also concerned about how opposition parties like Marine Le Pen's National Front will play the idea of the U.K. having too much of a say in French fiscal affairs. "The National Front already says that the U.K. will tell us what we want to do in the euro," the official said. "If they know an EU country has a way to block our destiny, that’s not right."

Germany: Chancellor Angela Merkel will be Cameron's strongest ally in making the case to other countries that they should agree to reforms to keep the British in the EU. Gearing up for its role as a "compromise broker," Germany formed its own Berlin-based task force to troubleshoot reforms even before Cameron delivered his demands to EU leaders. Merkel has been adamant about finding ways to accommodate British reform demands without re-opening treaty negotiations. Germany sees the U.K. as a pro-business, pro-free-trade ally in Europe, and a counterweight to France. But many have warned that although Berlin will argue to keep the U.K. in the EU, it will not bend over backwards for the Brits. “Germany wants to keep them in the European Union, under the conditions of the EU, and not at any expense,” said German MEP Elmar Brok, chairman of the European Parliament's foreign affairs committee. “Germany is only part of the game. There are 28 countries. They should not believe that Germany will give up the European beliefs and principles.”

Quick fixes

"Ever closer union": Dealing with the phrase is being seen as merely "a drafting matter" by officials involved in the negotiations that can be fixed with an interpretation of the treaty that states the phrase isn't a binding, legal requirement for further integration.

Dealing with the phrase is being seen as merely "a drafting matter" by officials involved in the negotiations that can be fixed with an interpretation of the treaty that states the phrase isn't a binding, legal requirement for further integration. The color system: To boost the power of national parliaments a provision within the existing Lisbon Treaty that already gives legislatures a "yellow card" to ask the Commission and European Parliament to halt and review legislation would be strengthened to include three levels of cards that the EU institutions must acknowledge. A green card would give national parliaments the power to propose legislation; a yellow card would give them the power to ask for amendments; and a red card would halt discussions altogether. The proposed threshold for the percentage of national delegates necessary to wave a card was still being discussed by diplomats last week.

To boost the power of national parliaments a provision within the existing Lisbon Treaty that already gives legislatures a "yellow card" to ask the Commission and European Parliament to halt and review legislation would be strengthened to include three levels of cards that the EU institutions must acknowledge. A green card would give national parliaments the power to propose legislation; a yellow card would give them the power to ask for amendments; and a red card would halt discussions altogether. The proposed threshold for the percentage of national delegates necessary to wave a card was still being discussed by diplomats last week. Euro outs: To ensure that eurozone "Outs" aren't affected by decisions of the "Ins," the draft text will spell out various principles protecting the rights of non-eurozone members. The safety mechanism Cameron wants was being negotiated over the weekend, with a possible proposal to give the U.K. and other non-euro countries the ability to call an EU summit over specific eurozone issues, an EU diplomat involved in the talks said.

Sticking points

The benefits ban: A blanket four-year ban on in-work benefits for EU migrants, as initially requested by Cameron, has been deemed incompatible with the treaties and the concept of freedom of movement within the single market, according to an EU diplomat involved in the negotiations. So in an effort to find a solution without changing the treaties, the Commission proposed an “emergency brake” mechanism that would activate the four-year ban if the U.K. could prove its public services were under strain because of an influx of migrants. Cameron has been adamant that the four-year ban be written into the text before the political debate begins on February 18.

A blanket four-year ban on in-work benefits for EU migrants, as initially requested by Cameron, has been deemed incompatible with the treaties and the concept of freedom of movement within the single market, according to an EU diplomat involved in the negotiations. So in an effort to find a solution without changing the treaties, the Commission proposed an “emergency brake” mechanism that would activate the four-year ban if the U.K. could prove its public services were under strain because of an influx of migrants. Cameron has been adamant that the four-year ban be written into the text before the political debate begins on February 18. Brake point: When an "emergency brake" was first presented as a solution, it was pitched as a mechanism to ban EU migrants from settling in the U.K., but has since been spun into an “indirect measure” that would remove the incentives for migrants to move to the U.K.. The brake would technically be available to all member countries but has been crafted for the British so that it would be applicable immediately after the referendum, according to an EU diplomat close to the negotiations.

What's next

Cameron wants to hold the referendum in June. In order to do that he needs to reach an agreement on his demands by either the February or March EU summits.

“What we got from the December Council is that Cameron wants us to go as fast as possible and it’s in the interest of the Union to do that,” said an EU diplomat involved in the negotiations. “If they want to meet a February deadline it’s important to have a strong text.”

"Cameron is holding onto his four-year solution," said another EU official. "He's holding his cards until the last minute. The real compromise will be in the middle of the night at the Council. He needs to get the four-year ban on paper, then it needs to be seen how it will be accommodated every which way."

Cameron met with Juncker on Friday to finesse the ban on migrants' benefits and continued to work throughout the weekend with the Commission to make the solution as strong as possible. He also met with Parliament President Martin Schulz on Friday. Cameron and Tusk had dinner on Sunday to put the final touches on the proposal which was due for distribution on Monday, but they said they would need an extra 24 hours to fix some remaining issues.

Schulz has invited Cameron to return to the Parliament on February 16, two days before the summit, to make his case to the political leaders of the groups. And the British prime minister will attend a dinner in Hamburg with German Chancellor Angela Merkel on February 12.

In other words, Cameron's EU reform sales pitch is far from over, and in some ways it is just beginning as the proposals take shape and become real political targets.