MANCHESTER, England (Reuters) - Prime Minister David Cameron said his renegotiation of Britain's ties with the European Union was "bloody hard work" and refused to rule out campaigning for a British exit in a referendum if other EU leaders failed to grant him the concessions he wants.
As his ruling Conservative Party gathered for its annual meeting, Cameron urged his party to be patient over Britain's relationship with Europe ahead of a vote on membership which he has promised by the end of 2017.
"If I don't get what I want then I rule nothing out," Cameron told BBC television when asked if he was prepared to lead Britain out of the bloc.
"But I am confident we will get what we need," he said in the northern English city of Manchester, where arguments over EU membership have overshadowed domestic announcements such as paid time off for older workers to look after their grandchildren.
Cameron's party has been riven by a conflict over Britain's relationship with Europe that contributed to the downfall of both Margaret Thatcher and John Major, the last two Conservative prime ministers.
When asked if Britain was drifting towards the EU exit, Cameron said: "I am trying to get for Britain the things that we need and obviously once I have got them I will turn around and make the case for staying in a reformed Europe."
Under pressure from lawmakers who feared the electoral success of the anti-EU UK Independence Party, Cameron in 2013 promised to hold a referendum, though UKIP won just one seat in this year's parliamentary election and Cameron won the first Conservative outright majority since 1992.
Outside the conference, thousands of people, some holding placards reading "End Austerity Now", marched as part of a protest against the government's spending cuts.
The main risk Cameron faces is that the Greek and migrant crises in Europe turn public opinion against membership just as arguments over Europe fracture his own party.
As many as one in five of his lawmakers is likely to vote to leave the EU, research from the Open Europe think tank showed, indicating the scale of the divide.
One senior Conservative even publicly urged supporters not to attack each other over Europe.
"We can debate ideas but as good Conservatives we must never attack each other," said Ashley Fox, the Conservative leader in the European Parliament, of the debate over Europe. "There will be good Conservatives on both sides of the argument."
A British exit would shake the Union to its core. Major investors and allies say a divorce would torpedo Britain's global clout and hurt London's financial powerhouse.
Both supporters and opponents of membership are launching campaigns and attracting financing, though opponents have two rival organizations.
Details on the course of Cameron's negotiations with European leaders including German Chancellor Angela Merkel are closely guarded but officials said details on the outline of a possible deal could be given in December.
Cameron is demanding the EU allow Britain to cut benefits for EU migrants and allow London to prevent the application of euro zone rules that might hurt Britain, which Cameron says will never join the euro.
When asked about disputes within his party over Europe, Cameron said: "There are some people who want to leave the EU ... and there is nothing I am going to bring back that will satisfy those people."
His foreign minister, Philip Hammond, echoed late Conservative leader Margaret Thatcher's 1990 "No, no, no," rhetoric to handing over sovereignty.
"No to business-destroying over-regulation. No to 'ever closer union' applying to Britain. No to abuse of our welfare system," Hammond said. "Never, ever to a European Army."
Writing by Guy Faulconbridge; Additional reporting by Elizabeth Piper; Editing by Alison Williams and Raissa Kasolowsky