The Defence Secretary said such a move was necessary amid concern among Conservatives over the mounting threat to the party from Ukip.

However, Mr Hammond cautioned that opposition from Labour and the Liberal Democrats would make it impossible for the Bill to pass the Commons before the next general election in 2015.

But following the sweeping gains made by Ukip in last week's council elections, he said they had to do every thing they could to reassure voters that they would honour their commitment to give them a say in the next parliament.

He said that he believed the Conservative general election manifesto would include a clear commitment to legislate for a referendum as soon as they began the next parliament.

And he said that he would strongly favour the idea of publishing a draft bill ahead of the general election to underline their determination to see it through.

"We are looking at doing that and I think that would be a very good idea. I would strongly support the idea of publishing a draft bill ahead of the election," he told BBC1's The Andrew Marr show.

He accepted that voters were wary about Prime Minister David Cameron's commitment to renegotiate Britain's membership terms and then put the new settlement to a referendum after the general election.

"I understand people's scepticism. They are saying 'Yeah, yeah, that's the other side of an election. What can you do now to reassure us?"' he said.

"We should do everything we can to reassure people about our commitment. We should make it in very clear and unambiguous terms, including publishing a bill so that people can see exactly what will be in it."

However he said that any attempt to put it to the Commons before the election, due in 2015, would be defeated.

"We would not get a bill through Parliament in this parliament. The Labour Party doesn't want people to have a say on Europe. The Liberal Democrats would not support an in/out referendum on Europe," he said.

"I would imagine our manifesto will make an absolutely clear commitment to legislating for the referendum as soon as we begin the next parliament."

The Prime Minister said last week that he was prepared to introduce legal safeguards before the end of the current parliament to guarantee that a referendum would take place after the general election in 2015. Previously he has promised to call a vote only if he is re-elected with a majority.

The legislation would be designed to demonstrate that he is committed to calling an in-out vote by 2018 after Ukip and other sceptics claimed that his pledge was meaningless.