Those who missed out on registering to vote in the EU referendum have until midnight on Wednesday after the deadline was extended.

The highly unusual move was made after the registration website crashed to due unprecedented demand as the deadline approached on Tuesday evening.

Emergency legislation will have to be brought to the House of Commons to ensure the move is legal.

The Prime Minister has urged those unable to register to vote in the EU referendum after a website crash to register today and they shall be enfranchised.

Speaking at Prime Minister's Questions, David Cameron says those who register "will be able to vote".

He said: "I am very clear that people should continue to register today. The Electoral Commission have made a statement this morning urging the government to consider options which would effectively extend the deadline and these should include legislative options and we are doing that.

"We are discussing them with the Electoral Commission today. We are working urgently with them to ensure those who registered today and who registered last night will be able to vote in the EU referendum.

David Cameron's promise comes after the Electoral Commission said it advised the government on Wednesday morning.

In a rare intervention the Commission has publicly stated that it has advised the Government to draft emergency legislation to invoke a change and it will support it in its bid.

A spokesperson for the Commission said: "It is vital that everyone who wants to participate in this historic referendum is able to.

"There was a very significant increase in applications to register to vote yesterday on the Government's website. However, issues with the Government website arose around 10.15pm and were not resolved until after the registration deadline at midnight.

"The Government are looking into exactly what happened.

"There will be many people who wanted to register to vote last night and were not able to. The registration deadline is set out in legislation and we have said to the Government this morning they should consider options for introducing legislation as soon as possible that would extend the deadline. We would support such a change."

The decision to intervene in the matter comes after a range of politicians called for the deadline to be extend.

Labour leader Jeremy Corbyn said the deadline "has to be extended" to allow those who could not access the page to be enfranchised.

Corbyn was been joined by Liberal Democrat leader Tim Farron who called the situation a "mess".

Farron said: "With individual voter registration, and a big campaign to encourage young people to register, many of whom have been trying to do so last-minute, this could have major consequences for the result.

"Evidence shows younger people are overwhelmingly pro-European, and if they are disenfranchised it could cost us our place in Europe. It could also turn them off democracy for life. Voters must be given an extra day while this mess is sorted out urgently".

The SNP's Westminster leader Angus Robertson also called on the UK Government to extend the deadline due to the "computer failure".

The referendum will take place on June 23. It is only the second referendum on Britain's membership of the European Union since joining the European Economic Community in 1973.