David Cameron will issue a dramatic warning to fellow EU leaders this week that he may have to recommend a UK exit from the European Union if they reject his demands for reform.

Turning up the pressure on the other 27 EU heads of state, the prime minister will formally table his list of demands – including a four-year ban on EU migrants claiming in-work benefits after entering the UK – in a letter to European Council president Donald Tusk on Tuesday. It will mark the start of months of detailed negotiations involving senior representatives of all EU governments, ahead of the promised in/out referendum on UK membership before the end of 2017.

In a speech on Tuesday, Cameron will use his strongest language to date to say that the status quo is not an acceptable option and that withdrawal may follow if the EU does not give substantial ground. Making clear that his, and his government’s, approach in the referendum campaign has not been predetermined, he will say: “If we can’t reach such an agreement, and if Britain’s concerns were to be met with a deaf ear, which I do not believe will happen, then we will have to think again about whether this European Union is right for us. As I have said before – I rule nothing out.”

The tone of his comments will reassure some Eurosceptics, who feared he had privately accepted that he might not win in key areas of the negotiations, but would recommend to voters that the UK should remain in the EU nonetheless. Cameron will insist that he has “every confidence that we will achieve an agreement that works for Britain and works for our European partners. And if and when we do so, as I said three years ago, I will campaign to keep Britain inside a reformed European Union – campaign for it with all my heart and all my soul, because that will be unambiguously in our national interest.”

His advisers have decided that, in order to push EU leaders to deliver a package that he can sell to voters as meaningful change, he must keep open the option of backing the “leave” campaign. The speech sets the stage for a series of tumultuous battles, particularly over restricting in-work benefits to EU migrants for four years, which many other EU nations, led by Poland, say would amount to a breach of the EU’s fundamental commitment to free movement of labour and discriminate against workers from other member nations. Downing Street insisted that suggestions Cameron would drop or soften the demand were untrue.

In his letter, demanded by other European leaders as a condition for beginning talks, Cameron is expected to spell out in general terms the four areas where he wants the EU to budge.

These are: the four-year ban on EU migrants claiming in-work and other benefits; greater protections for non-eurozone countries to ensure they cannot be outvoted by eurozone countries; giving Britain an opt-out from the EU’s commitment to “ever-closer union”; and giving parliaments more powers to club together to block EU legislation.

Senior government officials have indicated Cameron may think again about granting a vote to 16- and 17-year-olds, if, as is expected, the Lords backs the move in a vote on 18 November. The age group is regarded as more pro-EU than older voters.

Senior sources say that, although the Commons recently voted against the move, Cameron and senior ministers are not ruling out softening their opposition if the vote in the Lords results in a large majority in favour. However, a Downing Street source said: “We are not going to get into speculating on what may or may not happen. We will cross that bridge when we come to it.”

Labour believes Cameron may switch position because giving votes to 16- and 17-year-olds led to huge levels of engagement among young people in last year’s referendum on Scottish independence and because the EU vote will be binding. In Tuesday’s speech, Cameron will challenge both the Leave and Remain campaigns to clarify their arguments. “Those who believe we should stay in the EU at all costs need to explain why Britain should accept the status quo. I am clear that there are real problems with this.

“There are some economic risks if we allow a situation where eurozone countries could potentially spend our money, or where European regulations hold back our ability to trade and create jobs. And there are also significant risks if we allow our sovereignty to be eroded by ever closer union, or sit by and do nothing about the unsustainable rate of migration into our country.

“But just as those who are advocating staying in the EU at all costs have to answer serious questions, so those who think Britain should just leave now also need to think hard about the implications of their arguments.

“What would being outside the European Union mean for our economic security? And what does it mean for our national security?”