Image caption The EU referendum will take place at some before the end of 2017

The government may be forced to delay the EU referendum until 2017 if it loses a parliamentary vote on the electoral franchise later this month.

David Cameron has said the in-out vote will take place by the end of 2017 but is thought to prefer a date in 2016.

But the Electoral Commission told the BBC if 16 and 17 year-olds are given the vote, the poll should be delayed by as much as 12 months to register them.

The PM has said Parliament should decide the issue of the franchise.

Follow more on BBC Politics live

Ministers expect legislation paving the way for a referendum to be approved by the House of Commons and the House of Lords by January at the earliest, which would potentially allow for a referendum at some point next year.

But it is widely expected that the House of Lords will vote to give 16 and 17 year-olds the right to take part in the referendum.

Registration drive

In guidance seen by the BBC's Newsnight, the Electoral Commission has advised the government that, in this event, "electoral administrators" would need to enrol hundreds of thousands of new voters.

The Commission believes a six month period of preparation would be needed after the EU Referendum Bill received royal assent and a further six months would then be needed for a mass registration drive.

Image copyright Getty Images

When will vote take place?

The one thing we know for sure is that Prime Minister David Cameron has said it will happen by the end of 2017. The most likely times of the year for referendums are generally May or September, and some people think it should be held as soon as possible.

There had been suggestions that it could be held in May 2016, to coincide with elections in Scotland, Wales, Northern Ireland and London, rather than waiting for 2017 - but the government has ruled that out. Here is a full rundown of the likely dates and key events.

How to win a referendum

What David Cameron wants from the EU negotiations

Timeline: Campaigns for a European Union referendum

Businesses give their views on a possible EU exit

In a briefing to peers, the Commission wrote: "Any changes to the franchise for the referendum on the UK's membership of the European Union should be clear in sufficient time to enable all those who are newly eligible to vote to take the steps they need to successfully register and participate in the referendum."

If the government follows the guidance, then it would effectively rule out the possibility of the EU referendum being held in 2016.

The BBC's political editor Allegra Stratton said that although ministers have been careful not to commit to any particular date, insiders believed September 2016 was seen as being increasingly likely to avoid next summer's expected second migrant crisis and to allow maximum time for the UK's renegotiations to be successful.

Labour is to table an amendment to the EU Referendum Bill in the Lords at report stage that would allow 16 and 17 year-olds to vote in the poll.

The Labour leader in the Lords, Baroness Smith, told Newsnight that she thought the Lords were "likely to approve such an extension to the franchise".

Earlier this year the government was defeated on a similar amendment - lowering the voting age for elected mayors.

'No deal-breaker'

Any victory for the opposition in the Lords would then be scrutinised by the Commons. Labour, the Lib Dems and the SNP MPs support lowering the voting age and there are also some Conservative MPs who are also in favour.

"I'm picking up that even euro-sceptics are interested in lowering the voting age. I would say there are easily more than six or seven MPs who'd be interested in voting for such a measure," Tory MP Neil Carmichael told the programme.

"If I was Cameron I would say 'this is not a deal breaker, so why don't I just go along with it'".

The Electoral Commission believes that a six month period of preparation would be needed after the EU Referendum Bill received royal assent to prepare for an "annual canvass of households".

The watchdog says authorities will need a full year "to ensure that all those who need to take action have enough time to do so before the poll: 15 to 17 year-olds who would be newly entitled to vote would need to successfully apply to register; electoral administrators would need to ensure their systems are updated to process applications."