The prime minister said his government would not be "neutral" on the issue of EU membership PA

David Cameron has warned that ministers intending to campaign for Britain to pull out of the European Union will need to resign their positions in order to do so.

The prime minister said the government would not be "neutral" on the issue of EU membership and insisted his ministers backed his strategy to "renegotiate, get a deal that's in Britain's interest and then recommend Britain stays in" the EU.

"If you want to be part of the government you have to take the view that we are engaged in an exercise of renegotiation to have a referendum and that will lead to a successful outcome," Mr Cameron said.

"Everyone in government has signed up to the programme set out in the Conservative manifesto."

Read more

But within the Conservative party there are divisions on the issue. Eurosceptic Conservatives have made clear they are ready to campaign for an exit if Mr Cameron fails to come up with a package they believe delivers real change.

At least 50 Tory MPs have signed up to the newly-formed Conservatives for Britain (CfB) to keep the pressure on ahead on the popular vote.

Mr Obama told reporters he was 'looking forward' to Britain remaining in the EU (Getty)

The group, which includes former cabinet ministers Owen Paterson and John Redwood, wants to curb freedom of movement, a key principle of the EU, and make parliament sovereign over EU law.

Speaking on BBC Radio 5 Live Steve Baker, the Westminster chairman of the CfB, said that he believed some cabinet ministers would resign rather than campaign in favour of staying in the EU, but declined to name the ministers he was referring to.

"If we don't get a sovereign parliament, I would be quite surprised if one or two don't resign," he said.

Mr Cameron's warning to ministers comes after a very public intervention by Barack Obama, the US president, at the G7 summit in Schloss Elmau, Germany.

Eurosceptic Conservatives have made clear they will campaign for an exit from the EU unless the prime minster secures reform (Getty)

The two leaders held talks on the sidelines of the summit, with Mr Obama telling reporters ahead of their meeting that the US was "very much looking forward" to Britain remaining a part of the EU.

Speaking on the timing of the referendum, Mr Cameron indicated he had not ruled out staging it on 5 May 2016, despite advice by the Electoral Commission that he should avoid a clash with elections for the Scottish Parliament, Welsh Assembly, London Mayor and English councils on that date.

Appointments in David Cameron's Tory government

Appointments in David Cameron's Tory government

1/7
Amber Rudd: Energy and Climate Change Secretary

Wins a big promotion after increasing her majority in Hastings and Rye despite once describing her constituency as a “bit depressing”. The former banker and financial journalist is considered a moderate Eurosceptic

2/7
Priti Patel: Employment Minister (attending Cabinet)

Former party press officer and now the Witham MP is rewarded for her forceful performances during the election campaign. She is on the right of the party and a Eurosceptic. Ms Patel has called for the return of hanging

3/7
John Whittingdale: Culture Secretary

Having never been a minister in his 23 years as an MP John Whittingdale’s elevation to the Cabinet is meteoric. But his appointment sends a message to Tory backbenchers that preferment is possible even for those who may have given up hope (and be tempted to rebel)

Getty

4/7
Anna Soubry: Minister for Small Business

Not long ago the former defence minister feared she would not even be an MP but now she has a key role in the Department for Business and the right to attend Cabinet

5/7
Sajid Javid: Business Secretary

Rising star tipped as Britain’s first prime minister from an ethnic minority. Son of a bus driver, he grew up in two-bedroom flat in Bristol. After university he joined Deutsche Bank. Parliamentary aide to George Osborne before becoming Treasury minister and Culture Secretary

6/7
Greg Clark: Communities Secretary

Thoughtful moderniser who grew up in Middlesbrough where his father and grandfather were milkmen. Was a special adviser before entering Parliament in 2005. In previous ministerial posts he drew up plans to devolve powers to cities

7/7
Matthew Hancock: Cabinet Office minister and Paymaster General

A former aide to George Osborne before becoming an MP in 2010 election. Hancock has had a meteoric ministerial rise

Asked about the CfB, Mr Cameron said: "In the end, people have to make up their own mind. But it will be the public, it will be the people that decide, not one group of MPs or another group of MPs."

The government has promised that it will hold a referendum on Britain's EU membership before the end of 2017.