Britain's leaders supported a dominant role for France and Germany in creating a new European order after World War II, keeping their island nation as an interested observer until it applied to join the six-member European Economic Community (EEC) in 1961.
French President Charles de Gaulle vetoed Britain's membership but London made a renewed bid to join the group following de Gaulle's death in 1970. It finally became an EEC member in 1973 under Conservative Prime Minister Edward Heath.
"We have the character of an island nation – independent, forthright, passionate in defence of our sovereignty – and of institutions that have served us well for many hundreds of years," current Prime Minister David Cameron said in a speech in Germany last week.
"We stood apart when the original six signed the Treaty of Rome in 1957," Cameron said.
"But we are also an open nation," he said. "That openness drove the decision to join in 1973."
After Heath lost an election in 1975, the new Labour government of Harold Wilson kept a pre-election promise to renegotiate the terms of Britain's EEC membership before holding a referendum.
Two-thirds of voters opted to remain part of the EEC, after the three main political parties and most national newspapers supported the "yes" vote.
Margaret Thatcher became the next Conservative prime minister following a resounding election victory in 1979, vowing to "work for a common-sense [EEC] which resists excessive bureaucracy and unnecessary harmonization proposals."
Thatcher negotiated a permanent rebate for Britain on its financial contribution to the EEC, arguing that Britain received lower agricultural subsidies than other nations.
During her 11 years as prime minister, she became increasingly critical of the movement towards European political integration and a single currency.
In a robust speech in Bruges in 1988, Thatcher opposed the creation of an "identikit European personality" and complained that Britain's sovereignty was under threat from the creation of "a European super-state exercising a new dominance from Brussels."
Thatcher's speech cheered a growing number of Eurosceptics in her party but angered pro-European members of her cabinet, culminating in a rebellion by leading Conservatives that ended with her resignation.
Her successor as Conservative leader and prime miniter, John Major, signed the Maastricht Treaty on the formation of the European Union in early 1992, with Britain opting out of a single currency and the social policy objectives of the treaty's Social Chapter.
Just a few months later, in September 1992, Major's government was forced to withdraw Britain from the European Exchange Rate Mechanism amid damaging currency speculation that became known as "Black Wednesday."
Labour, back in power under prime minister Tony Blair from 1997, sought to distance itself from "an increasing number of Conservatives, overtly or covertly" who favoured Britain leaving the European Union.
"Our vision of Europe is of an alliance of independent nations choosing to co-operate to achieve the goals they cannot achieve alone," the Labour Party said. "We oppose a European federal superstate."
Blair signed Britain up to the Social Chapter - appeasing some on the left of his party who sought better protection for employment and other rights - but he promised Britain would not join a single currency without another referendum.
In January 2013, Conservative Prime Minister Cameron, the leader of a coalition government since 2010, announced plans to negotiate improvements to the terms of Britain's EU membership before holding an in-out referendum.
Cameron repeated his promise after his party won a parliamentary majority a general election in May, despite gaining only 37 per cent of the votes cast, saying he would hold the referendum by the end of 2017.
Some observers see Cameron's insistence on pushing the renegotiation and holding a referendum as driven largely by the need to pacify Eurosceptics in his own party.