Scottish Conservative leader Ruth Davidson has condemned the lowering of flags on public buildings as a mark of respect for the Saudi king.

Ms Davidson tweeted that it was "a steaming pile of nonsense".

Downing Street and other Whitehall departments were among those to put Union Flags at half mast after the death of 90-year-old King Abdullah.

In a second tweet, Ms Davidson said it was a "stupid act on its own and a stupid precedent to set".

Image copyright AP Image caption The flags were lowered for Saudi Arabia's King Abdullah

Image copyright Scottish Parliament Image caption Ruth Davidson said it set a "stupid precedent"

The UK government's Department for Culture, Media and Sport (DCMS) sent out the request.

Officials said it was a matter of protocol and that the formal request had been made by Buckingham Palace, which is also flying its flag at half mast.

But the move caused disquiet because of the human rights record of the country during King Abdullah's reign.

There has been recent outrage focused on the public beheading of a woman and a sentence of 1,000 lashes meted out to the creator of an online blog.

The mark of respect was not adopted north of the border.

A Scottish government spokesman said: "We offer the people of Saudi Arabia our condolences following the passing of King Abdullah.

"Flags are not routinely flown at half-mast from Scottish government buildings to mark the deaths of foreign heads of government or state."

Scottish Labour leader Jim Murphy said the Scottish government had got it right.

He said: "I know there are all sorts of issues of protocol here. But when the sorts of things that happen in Saudi Arabia - a thousand lashes, the recent beheading of a woman.

"I think, all across Scotland - all across the UK - there will be a sense of bewilderment about it."

Ms Davidson's tweets came as Tory Prime Minister David Cameron and the Prince of Wales prepared to fly to Saudi Arabia to join international figures paying tribute to the king, who was seen as a crucial Western ally.

Mr Cameron said that he was "deeply saddened" and that the ruler would be "remembered for his long years of service to the kingdom, for his commitment to peace and for strengthening understanding between faiths".

Former Tory MP Louise Mensch issued a foul-mouthed response to Mr Cameron's message of condolence to the Saudi royals and said she felt "ashamed to be a Conservative" until Ms Davidson spoke out.

She said: "It is so unacceptable to offer deep condolences for a man who flogged women, didn't let them drive, saw guardian laws passed & STARVES THEM".

"I have been ashamed to be a Conservative today. Ruth Davidson has restored my faith. Somebody who truly stands for something."

The flags issue also split opinion between two of UKIP's key figures.

Leader Nigel Farage said it showed "respect for an ally in the war against terror" and that the issue of human rights should be taken up with the new king.

But MP Douglas Carswell said officials had seriously blundered and showed "immoral" values far from those of the British public.