The basis of a deal has been reached between the UK and Scottish governments over the independence referendum.
In a joint statement Deputy First Minister Nicola Sturgeon and Scottish Secretary Michael Moore said "substantial progress" had been made.
But the BBC understands that although a few minor details need to be ironed out, a package of measures has been agreed.
It paves the way for a meeting between David Cameron and Alex Salmond.
This is expected to take place on Monday in Edinburgh.
The prime minister and the first minister are expected to agree on a plan which will involve a referendum which asks a single yes/no question on whether Scotland should leave the United Kingdom.
It is understood the agreement will also extend the vote to include those aged over 16 in Scotland.
Mr Moore, who is currently on holiday, and Ms Sturgeon spoke on the phone on Monday night and are due to do so again on Friday.
It follows a series of face-to-face meetings and negotiations between the pair in recent weeks.
A joint statement issued by the Scottish government and the Scotland Office after Mr Moore and Ms Sturgeon's latest conversation said: "Further substantial progress towards agreement was reached this afternoon between the Deputy First Minister Nicola Sturgeon and the Secretary of State Michael Moore.
"Officials have now been tasked with doing some further work on the final detail of the agreement.
"We are however on track for the full agreement, including the terms of a section 30 order, to be presented to the First Minister and the Prime Minister over the next few days."
The BBC's political editor, Nick Robinson, said the deal - if it is finalised - will be presented as "a compromise involving concessions by both sides".
The SNP is understood to have accepted a single question referendum, as opposed to two questions including one on greater powers for the Scottish Parliament, whilst the UK government has abandoned its opposition to giving 16 and 17-year-olds a vote.
Scotland Office Minister, David Mundell, who has been involved in the negotiations, told the BBC there will be one question and confirmed the vote will be held before the end of 2014.
He said: "It won't automatically be the case that 16 and 17-year-olds can vote in the referendum.
"The UK government, certainly the Conservative party, oppose that change.
"It will be up to Scottish Parliament to determine who can vote in the referendum in Scotland, and also the date and the nature of the question."
Scottish Finance Secretary John Swinney said progress had been made but "further ground" had to be covered before a final agreement is reached.
He added: "The Scottish government has always made clear that we preferred to have a single question on whether Scotland should become an independent country.
"But we also recognised that some people in Scotland want to consider other options to strengthen the powers of the parliament.
"That is a question we have consulted upon, it is one we have discussed and it has been an important part of the discussions with the UK government, but throughout all of this our preference has been to have a single question."
When a final agreement between the two governments is formalised legislation to set up the referendum is expected go before both the Westminster and Holyrood parliaments.