The Scottish Parliament's Ministerial Code will be updated to remove "even the perception of any conflict of interest".

Ministerial aides will be prevented from serving on Holyrood committees responsible for scrutinising their bosses under the rule change.

It follows complaints ministers were trying to "block scrutiny" in the Scottish Parliament.

It had emerged some SNP MSPs appointed as parliamentary liaison officers (PLOs) also sit on the committee covering the same policy area as the minister for whom they work.

For example, SNP backbencher Jenny Gilruth is education secretary John Swinney's PLO but she also sits on the education committee.

First Minister Nicola Sturgeon said the code would be updated to ensure PLOs will no longer be able to serve on the principal committee which scrutinises the portfolio to which they are attached.

She said: "MSPs who serve as aides to ministers do a vital job in terms of the required liaison between parliament and government.

"As such, it is important that they are able to carry out that function with the full confidence of both ministers and the parliamentary committees on which they serve.

"I believe that the parliamentary liaison officers who are currently in post fulfil that requirement admirably and there has been no evidence of any conflict of interest.

"At the same time, I have listened carefully to the case made by those calling for change and so the updated guidelines I am publishing today will remove even the perception of any conflict of interest in the role of PLOs."

She added: "The change is part of the updated Ministerial Code, which sets the highest standards of propriety and transparency for Scottish Government ministers. I will continue to lead by example in following the letter and spirit of this code, and I expect that all ministers will do likewise."

Opposition parties hailed the move as a victory, with the Conservatives saying the move brings an end to a "clear conflict of interest".

Central Scotland MSP Margaret Mitchell said: "I'm glad that Nicola Sturgeon has finally seen sense on this issue and removed these ministerial aides from their committees.

"Serving on a committee that scrutinises your boss is a clear conflict of interest, and in the interests of the integrity of the parliament the situation had to change.

"It is for this reason myself and three other committee conveners wrote to the First Minister, demanding that these PLOs be removed.

"Robust scrutiny is an absolute necessity within the parliament's committee system.

"This is especially the case given the failure of the committees to live up to the important and unique role envisaged for them when the Parliament was established."

Scottish Liberal Democrats business manager Mike Rumbles said: "The idea that a parliamentary liaison officer should help brief their minister for a committee hearing before crossing the floor and asking questions of them is patently ludicrous.

"The fact that the SNP had to be shamed into taking this basic step to preserve the independence of the committee system speaks volumes about their attitude to transparency and accountability."

Patrick Harvie MSP, co-convener of the Scottish Greens, welcomed the rule change.

He said: "Over recent years it has become all too common to see MSPs who work directly for ministers sitting as members of the committees which are supposed to hold them to account, raising a clear conflict of interests.

"It has taken persistent pressure to challenge this practice and I am pleased to see that Nicola Sturgeon has finally agreed to end this practice."