ARTICLE AD BOX
By David Cowan
Home affairs correspondent, BBC Scotland
The police investigation into SNP finances has been going on behind the scenes since July 2021 after a pro-independence campaigner made a complaint.
Operation Branchform has now gone public in the most dramatic fashion, with massive news coverage of Peter Murrell's arrest and police searches at his home and the SNP's headquarters.
Given the importance of the case, there is great interest in how these inquiries are carried out in Scotland and what might happen next.
To help understand, it is crucial to know the role of the police and Crown, the rules around arrest and contempt of court laws.
When someone reports a potential crime, the police will decide if an investigation is required. They will then try to gather evidence, establish all the facts and charge a suspect.
In this case, that process began 20 months ago.
Earlier this year, Police Scotland sent an initial report seeking advice and guidance from the body which prosecutes crimes in Scotland, the Crown Office and Procurator Fiscal Service (COPFS).
That advice was provided and the investigation continued, leading to Wednesday's arrest.
The police said Mr Murrell was being treated as a suspect. He was taken into custody for the legally defined period of up to 12 hours of questioning.
Last night he was released without charge, pending further inquiries.
Under the Criminal Justice (Scotland) Act 2016, police can release a suspect for further investigation with conditions for up to 28 days with the power to re-arrest them.
Conditions can include not being allowed to go to certain places or talk to certain people but it is not known if that has happened in this case.
Over the coming days and weeks, the police will continue to investigate and gather evidence. They can ask for more guidance from COPFS.
If a suspect is charged, their status will change and more legal protections will kick in. They cannot be questioned again by the police although they can make a statement.
Ultimately, the detectives will send what is called a standard prosecution report to COPFS.
Prosecutors will then consider whether there is sufficient admissible evidence to show a crime was committed and the suspect was responsible.
They will take the public interest into account. That can be influenced by the particular circumstances of the case - for example, whether the person involved was in a position of trust or authority.
If they feel the evidence meets the necessary tests, the case will go to court.
Alternatively, COPFS can instruct the police to carry out further inquiries if they decide there is insufficient evidence.
If they are still not satisfied there is enough to justify a prosecution, the case would go no further.
The law officers at the top of the Crown Office will not be involved in this lengthy process.
The Lord Advocate Dorothy Bain KC and Solicitor General Ruth Charteris KC have dual roles as public prosecutors and principal legal advisors to the Scottish government, which has been run by the SNP since 2007.
For that reason, they will not be consulted when a decision is made about what should happen to Mr Murrell. That task will fall to others.
Contempt of court rules
His arrest means the case is active for the purposes of the Contempt of Court Act 1981.
In plain English, everyone now has to be careful about what they say in case it prejudices a future trial.
This applies to politicians and members of the public on social media as well as broadcasters and newspapers.
All that can be reported are the basic facts.
Scotland is not the United States, where pundits merrily pontificate about the guilt or innocence of a suspect long before the case goes anywhere near a jury.
One last thing. People might wonder why the inquiry is called Operation Branchform.
The titles for Police Scotland investigations are picked at random.
The name does not mean anything and it is likely to be many months before we know whether Branchform goes anywhere.