Britain's continued membership in the European Union is contingent upon it being allowed to stop migrants from the bloc tapping into its relatively generous welfare system, Prime Minister David Cameron will warn on Friday.

In a speech designed to breathe new life into his campaign to be re-elected in May next year, Cameron will say he wants EU migrants in work to have to wait four years before they can access welfare benefits and for unemployed EU migrants not to be eligible for any help from the British state at all.

With polls showing immigration is voters' top concern, Cameron is under pressure to take a tougher line on the issue. Many of his Conservative lawmakers fear the rise in popularity of the anti-EU UK Independence Party, which this month won its second seat in Parliament, threatens their re-election chances.