SNP leader Alex Salmond threatened one of his rivals that he would not be a candidate for the next Holyrood election unless he withdrew parts of his "very dangerous" book.

The Banff and Buchan MP told Michael Russell his new book - which made searing criticisms of Salmond and his policies - was incompatible with standing for the Nationalists.

He sent his colleague handwritten notes, which the Sunday Herald has obtained, highlighting sections of the book he objected to.

Russell, the former MSP who fought Salmond for the leadership in 2005, then salvaged his candidacy by making humiliating changes to his book.

The feud has been caused by the publication of Grasping The Thistle, a polemic co-authored by Russell and businessman Dennis MacLeod.

The book is controversial because it challenges the SNP's approach to delivering independence and backs a market-based approach to public sector reform, which the party is hostile to.

But the Sunday Herald can reveal the existence of a much more radical version of the book that was changed at the last minute.

Russell recently sent a copy of the "first" version to Salmond, who was appalled by some of the content and complained vigorously to the author.

He warned the former MSP that he would not be a candidate next year unless he agreed to withdraw parts of the book.

Salmond then sent Russell handwritten notes which explained in detail the problems he had with the tract.

The notes, which the Sunday Herald possesses, are broken down into code.

Salmond marked key passages with "VD", which stands for very dangerous, while other paragraphs were given a "D" for dangerous. A third category, "RH", stood for relatively harmless.

Many of the "very dangerous" passages were then censored by Russell, such as his criticisms of Salmond, as well as the call for a separate Scottish currency and the introduction of health vouchers. A key section on the SNP was also dropped after Salmond's complaints.

But it is the parts marked "RH" that will put most pressure on Salmond. The SNP leader, who terms himself a social democrat, described Russell's call for the SNP to lift its bar on working with the Tories as "relatively harmless".

In addition, he responded to the first book's demand for a "flat" rate of income tax, which is normally associated with the political right, with an "RH" marking. Russell is said to have given in to Salmond because he is desperate for a return to the Scottish parliament.

The former MSP, who is almost guaranteed a place in Holyrood next year, took Salmond's threat seriously and reluctantly made the changes. He also inserted a grovelling "author's note" into the final text, in which he signed up to the SNP's policy programme.

Salmond last night admitted sending the notes to Russell but refused to be drawn on his threat of deselection.

"I'm not commenting on private conversations. SNP candidates have to accept the SNP programme."

Russell refused to comment on his recent dealings with the SNP leader, but said: "We sent a number of copies for comment to a number of individuals and took very seriously all the feedback we received. That is well illustrated by the positive commendations and is referred to in the text."

A spokesman for Scottish Labour said Salmond should explain his remarks about a flat rate of income tax.

"Alex Salmond's Penny For Scotland campaign was ridiculous enough, but this idea takes economic incompetence to a whole new level. To describe a flat income tax - where a millionaire footballer pays the same amount of tax as a nurse or teacher - as 'relatively harmless' is incredible. This is a policy even the Tories decided was too extreme."