David Cameron and Alex Salmond
David Cameron signs agreement for referendum on Scottish independence.

David Cameron has signed an agreement that will allow Scotland to vote on whether to stay part of the UK or become an independent nation.

The prime minister met with Scotland's first minister, Alex Salmond, in Edinburgh, where it was agreed the referendum will take place in the autumn of 2014.

Voters will be asked a simple yes/no question on whether they think Scotland should leave the UK.

The decision to hold a referendum came after the 2011 parliamentary election, which the Scottish National Party won by a clear majority.

Prior to this, the Scottish government conducted the National Conversation, in which they invited members of the public to comment on a range of issues relating to the country's constitution.

Should Scotland vote to become independent, it would mark the end of a 305-year partnership with England, forged in the Act of Union in 1707.

Cameron, a long-time opponent of Scottish independence, said: "This marks the beginning of an important chapter in Scotland's story and allows the real debate to begin.

"It paves the way so that the biggest question of all can be settled: a separate Scotland or a United Kingdom? I will be making a very positive argument for our United Kingdom."

The referendum will also make history as the first UK poll in which 16 and 17-year-olds are able to participate.

Speaking before the meeting, Salmond said: "The agreement will see Scotland take an important step toward independence, and the means to create a fairer and more prosperous Scotland. I look forward to working positively for a 'yes' vote in 2014."

Despite nationalist enthusiasm for the referendum, the most recent poll suggested that most people were in favour of staying part of the UK. Just 28 per cent said they support Scottish independence.

Secretary of State for Scotland, Michael Moore, said he believes Scotland will vote to remain in the UK. He said: "Independence is about Scotland leaving the UK, becoming a separate state, taking on all the burdens and risks that go with that and losing the benefits and opportunities that we have as part of the UK."

In the event of a 'yes' vote in 2014, Scotland would not become independent automatically. Instead, talks would begin with the UK government to begin the transition to independence. "This would involve negotiations with the UK Government. These negotiations would deal with the terms of independence as well as with the arrangements for the transition," the Scottish Government said.

"Formal negotiations would also be opened on Scotland's international responsibilities, in the European Union and more widely."

It has been suggested that a yes vote could result in Scottish independence by 2016.