Parliament passed a second reading of the EU Referendum Bill on 9 June by a huge majority. However, Britain's Foreign Secretary Philip Hammond, who is piloting the Bill through the House, was immediately accused by Tory eurosceptics of trying to fix the result in favour of staying in.
Speaking before the Commons passed the Bill by 544 votes to 53, Hammond said it would give an "entire generation" of British citizens a first chance to decide on the country's relationship with the EU. Britain last voted on EU - then the European Market - membership in 1975.
Hammond said: "We've had referendums on Scottish devolution, referendums on Welsh devolution, referendums on our electoral system and on a regional assembly for the north east.
"But an entire generation of British voters has been denied the chance to have a say on our relationship with the European Union. And Mr Speaker, today we are putting that right."
"To many people, the EU has come to feel like something done to them, not for them."
He added: added: "We need a fundamental change in the way the European Union operates. It is now a union which has at its core a eurozone of 19 members which will integrate more closely together.
"There needs to be an explicit recognition those who are not part of that core do not need to pursue ever closer union. There need to be an explicit protection of the interests of those non-eurozone members as the EU goes forward.
"We expect to be able to negotiate a new deal which will address the concerns of the British people which we will then put to them in the promised referendum."
Row behind the Purdah
While the government had the support of the opposition Labour, Scottish National and Liberal Democrat parties, there were rumblings of discontent among Tory eurosceptics.
Hammond was repeatedly criticised by his own backbenchers - some of them senior with ties in the Cabinet - over a Purdah provision to allow ministers and civil servants to speak out immediately before the vote. Civil servants usually have a 28-day Purdah.
He said the government would not use "public money to send out mailshots".
Owen Paterson, a former Tory cabinet minister, said Mr Hammond's argument about why public money might be spent explaining the government's favoured outcome was "nonsense" as it could make the vote appear "rigged" and render the result "illegitimate".
Paterson, along with many Tory MPs, believe Prime Minister David Cameron will back a Yes vote even if he manages to secure only cosmetic changes to Britain's relationship with the EU.
The eurosceptics want Cameron to bring back a deal that would repatriate wide-ranging powers to the UK parliament and give Britain control over its borders with regard to EU citizens.
Former Attorney General Dominic Grieve also urged the Foreign Secretary not to make it seem as though he wanted to "load the dice" in favour of a Yes vote.
Tory Hokey Cokey
Shadow Foreign Secretary Hilary Benn said the Labour leadership would campaign strongly in favour of the UK remaining a part of the EU - but warned that the Tories were playing "hokey cokey" with the referendum.
"The prime minister is probably for in, but he can't say definitely he's in or out because a lot of his MPs are for out unless they can be persuaded to be in," he said.
"Meanwhile, the foreign secretary who used to be leaning out now appears to be leaning in, while other members of the Cabinet who are for out read yesterday that they would be out unless they campaigned for in.
"Now it seems they might be in even though after all they are probably for out. In, out, in, out, it's the EU Tory Hokey Cokey - a complete mess."
There was also a row over the voting age, with Labour, the Lib Dems, the SNP and some Tory MPs supporting including 16-17 year olds. The government position, however, is that it should be open to those who vote in UK parliamentary elections, that is the over-18s.