* Local, European elections being held in the UK
* Anti-EU UKIP party forecast to come first or second
* But poll shows Britons would vote to stay in EU
By Andrew Osborn
LONDON, May 22 As Britain voted on Thursday in local and European elections an opinion poll exposed a paradox: The anti-EU UK Independence Party is forecast to win the European vote yet public opinion favours staying inside the European Union.
The poll, the last conducted before voting began, was based on an unusually large sample of more than 6,000 people, and suggested many were unhappy about the nature of Britain's ties with the EU even if they didn't favour leaving the bloc.
The YouGov survey put support for UKIP, which wants Britain to leave the EU, on 27 percent, ahead of all other parties. But paradoxically it said 42 percent of those polled would vote to stay in the EU if given the chance and 37 percent to leave.
UKIP wants an in/out EU membership referendum but has no lawmakers in the British parliament to press for one, while Conservative Prime Minister David Cameron has promised to hold such a vote by the end of 2017 if re-elected next year. The Liberal Democrats and the opposition Labour party only back such a vote if there's a major new power transfer to the EU.
Mats Persson, the director of Open Europe, a think tank which campaigns for reform of the EU, said the poll showed UKIP leader Nigel Farage had not yet won the big argument.
"Farage himself is very effective at maximising the vote," Persson told Reuters. "But fundamentally he has failed to convince a majority of the British public on this key issue because he has not put forward a credible option for life outside the EU."
Farage says Britain would be more democratic and prosperous outside the 28-nation bloc.
Patrick O'Flynn, UKIP's director of communications, said the party planned to fight one battle at a time.
"People are not very good predictors of their own future attitudes and much better at knowing what they are currently thinking," he said. "It (the poll) doesn't particularly worry me in terms of winning a referendum."
The European election, though in many ways a poor indicator of voting intentions in a national vote, is the last test of British national opinion before a general election next year and is seen as a useful barometer of the public mood.
The elections will determine the political persuasion of Britain's 73 lawmakers in the 751-seat European Parliament. Local elections being held on the same day will decide the fate of 4,216 local council seats, many of them in London.
Thursday's survey, conducted on Tuesday and Wednesday among 6,124 people, put UKIP's support on 27 percent. The Labour party was on 26 percent, the Conservatives on 22 percent, the Greens on 10 percent, and the Liberal Democrats on 9 percent.
That is broadly consistent with previous polls, which suggest many voters are fed up with the three main political parties, viewing their policies as increasingly indistinguishable.
Many Britons feel London has surrendered too many powers to the EU and UKIP has argued that the EU's freedom of movement policy makes it impossible to control Britain's borders.
Thursday's poll suggested UKIP's linkage of the two issues was one which resonated with voters. The survey showed immigration and Europe topped voter concerns, outstripping worries over the economy.
The findings are mixed news for Prime Minister Cameron. They suggests his pledge to try to reshape Britain's EU ties and hold an EU membership referendum if re-elected is attractive to many voters despite doubts over whether he can achieve reform.
However, the level of public anxiety about immigration is a problem for him. His promise to reduce net migration to the "tens of thousands" is way off target as figures published on Thursday showed.
His party was never expected to do well on Thursday. Most polls have long shown it will be pushed into third place behind Labour and UKIP in a vote that many Britons regard as a consequence-free opportunity to punish the incumbent party for its perceived failings to try to correct its course.
Turnout in such elections is traditionally low. Polling shows many Britons don't care who represents them in the European Parliament or at a local level, and the proportional representation voting system means the ballot favours small parties whose chances of doing well in national elections are much lower because of the first-past-the-post voting system.
However, the closeness of Thursday's vote to next year's national election means the results will be closely watched and could trigger potentially serious changes in political parties' morale, lineup, and policies.
Results for the European elections will be available on Sunday evening, in line with the rest of the EU, while results for the local elections, likely to offer a foretaste of the EU results, will be released in full on Friday. (Editing by Ralph Boulton)