David Cameron has told allies he will not resign as prime minister if Scotland votes for independence in an effort to ensure Scots do not think his future as Tory leader is on the ballot paper this September.

Cameron is unpopular in Scotland, and Downing Street may be concerned that some Scots will vote for independence to express their dislike of the Conservatives, and even in the hope of ejecting Cameron.

The revelation in the Daily Mail also serves to underline the extent to which Westminster is still concerned that Scotland could vote for independence in the referendum on 18 September.

Separately Cameron has promised he will resign if he does not deliver a referendum on renegotiated terms of British membership of the European Union in 2017.

There are likely to be calls for Cameron to quit if Scotland votes in favour of independence, since he could be held responsible for the break-up of the 300-year union. It could be argued that he is culpable since he agreed to the referendum in the belief that Scotland would vote against independence, and this would have been a huge misjudgment.

However, the campaign to ensure Scotland remains in the union, Better Together, has cross-party support so the blame would not lie solely with Cameron.

Some recent polls have suggested that what was a strong lead for the no campaign has been significantly eroded, leading to fears that Alex Salmond, the first minister of Scotland, could pull off a shock victory for Scottish independence.

One ICM poll last month found 42% of voters intended to vote no and 39% yes, with 19% undecided.