The Scottish government has announced an independent review into how complaints against the police are handled.
It will be carried out by the former Lord Advocate, Dame Elish Angiolini.
The move follows questions raised about the way investigations are carried out into senior police officers, including former chief constable Phil Gormley.
He resigned five months after a series of investigations had begun into allegations of gross misconduct.
The government said the new review, jointly commissioned by Justice Secretary Michael Matheson and Lord Advocate James Wolffe QC, will assess "the current framework and report on the effectiveness of structures, operational responsibilities and processes".
It will also make recommendations for improvements "to ensure the system is fair, transparent, accountable and proportionate, in order to strengthen public confidence in policing in Scotland".
'Held to account'
Mr Matheson said: "Most of us recognise and welcome the diligent, expert and often courageous work of the many thousands of police officers and staff who help keep Scotland's communities safe.
"That public confidence is also sustained by knowing that when things go wrong, the police are held to account, lessons are learned and improvements made.
"Given some of the questions raised in recent times about the processes for police complaints-handling, investigations and misconduct issues, and whether they could be improved, the time is right for this independent review."
He said the review would "seek to ensure that roles and responsibilities are clear, agreed protocols will balance transparency with appropriate levels of confidentiality".
Dame Elish said it was vital the complaints system was "robust and fair, and trusted by all those involved".
She added: "I look forward to engaging with those with direct involvement and experience of the current system - from all perspectives - to understand how it is working in practice and to identify areas for improvement."
Scottish Labour welcomed the "important and necessary review".
Justice committee member Daniel Johnson MSP said: "The soap opera of recent months with accusations and counter-accusations around senior officers is not healthy for Police Scotland. The complaints-handling process has been slow and is poorly understood by the public.
"At present, when a senior officer resigns, the investigation is dropped and any potential lessons for the force are lost. That must be a key focus of this review."