Deputy First Minister Nicola Sturgeon and Scottish Secretary Michael Moore met on Friday afternoon for talks. Their discussions included the use of a Section 30 order which would transfer power to Holyrood to legislate on the referendum, due in late 2014.
In a joint statement issued after the talks, they said: "We have resolved the issues that remained outstanding between us and reached a positive conclusion to our discussions. The full agreement, including the terms of the section 30 order, will now go to the First Minister and the Prime Minister for their discussion and approval."
Earlier this week, Mr Cameron promised to campaign against Scottish independence with "everything we've got". In his speech to the Conservative Party conference, he asked: "What could matter more than saving our United Kingdom?"
Speaking after the talks, Mr Moore said: "I would like to thank Nicola Sturgeon for the constructive manner in which she has conducted these negotiations over recent weeks. I am very satisfied with the position we have arrived at.
"I am confident this agreement will be approved by the Prime Minister and First Minister on Monday and that Scotland will have a legal, fair and decisive referendum to decide whether we remain part of the United Kingdom."