Alex Salmond backs Nicola Sturgeon amid calls for her head
He said Ms Sturgeon, who was sitting beside him in the Scottish Parliament's chamber, had followed the "rules and obligations" on how an MSP should act in such a case.
Labour had claimed Ms Sturgeon made an "appalling" error of judgement by writing to the court in support of Rauf. Leader Iain Gray challenged Mr Salmond to either back his deputy or sack her.
Raising the issue at First Minister's Questions, Mr Gray said: "I spent yesterday standing up for the victims of knife crime. Nicola Sturgeon spent yesterday standing up for a criminal. That is how bad her judgement is.
"This is about the First Minister's judgement now. Whose side is he on?
"One last chance: will he back Nicola Sturgeon or will he sack her?"
Mr Salmond replied: "I admire, like the people of Scotland and her constituents, Nicola Sturgeon's work as constituency member of parliament.
"I think she is a fantastic Deputy First Minister and she has my 110 per cent support.
"The rules and obligations on a member of parliament are laid down and Nicola Sturgeon has followed these rules and obligations."
Tory leader Annabel Goldie stopped short of demanding Miss Sturgeon quit but said she may have to make a Holyrood statement on the matter.
"Many questions need to be answered and must be answered if Miss Sturgeon is to retain the confidence of this Parliament."
Liberal Democrat leader Tavish Scott also pressed Mr Salmond on the issue, calling on the First Minister to explain where he drew the "judgement" line.
"Is there anyone who can walk through an SNP minister's door and who would not get the letter they wanted?" Mr Scott asked.
"How bad does it have to be before the SNP say no?"
The clashes at Holyrood began with Mr Gray pointing out that the ministerial code of conduct said "it may not be appropriate for a minister to provide a reference, even as an MSP" in some cases.
Rauf admitted defrauding the Department of Work and Pensions of tens of thousands of pounds.
Mr Gray said: "What about the case of a criminal, who stole 80,000 of benefits, who had been previously convicted of stealing people's pension and benefits cheques while running their post office?"
He asked Mr Salmond: "Does the First Minister think someone guilty of that crime should go to prison?"
Rauf has yet to be sentenced and Mr Salmond said if he commented on a live court case it would be "in breach of a whole range of things, including parliamentary procedure, ministerial procedure and every other procedure".
But he said: "If of course I or Iain Gray was the MSP, then we would have an absolute obligation to take on a case, as specified in the MSPs' code of conduct."
The First Minister accepted there are "sometimes when you can't do anything to help your constituent" and cited cases in which there is a conflict of interest as an example of when MSPs should not act.
But he argued: "Every MSP in this chamber should have a duty of care to their constituents and if you can help, you should try to help."
He said that was how "a real constituency MSP like Nicola Sturgeon serves her constituents".
Mr Gray told MSPs: "I would not have written this letter for a constituent who was guilty of this repeat crime."
The Labour leader asked all MSPs in the chamber to put their hand up if they too would have written a letter on behalf of Rauf.
"I wonder, are there any other MSPs in this chamber willing to say they would have written the same letter for the same man having committed the same crime? Put your hands up?"
With no MSPs obviously raising their hands, Mr Gray added: "The First Minister and his Deputy seem to be on their own on this one."
He asked the First Minister "where he draws the line", asking: "What crime do you have to commit not to receive a character reference from the First Minister or his deputy."
But Mr Salmond said there are a number of examples where other local politicians had supported their constituents in court cases.
And he cited a case where Gordon Brown had done this while he was Chancellor.
Mr Salmond said Mr Brown had written a character reference for a constituent.
The sentencing judge had said the case would normally attract a prison sentence but had sentenced the offender to community service, in part because of "all the references" he had received, the First Minister said.