A public inquiry is to be held into the circumstances surrounding the death of Sheku Bayoh in police custody.
The 32-year-old never regained consciousness after being restrained by police in Kirkcaldy, Fife, in 2015.
Justice Secretary Humza Yousaf said the questions to be examined by the inquiry would include whether race played a part in Mr Bayoh's death.
On Monday, it was confirmed that no police officers would face prosecution over the case.
Mr Bayoh's family said they felt "betrayed" by the decision not to prosecute the officers involved, who have always denied any wrongdoing.
Mr Yousaf and First Minister Nicola Sturgeon met the family on Tuesday.
Afterwards, Ms Sturgeon tweeted: "I made clear the Scottish government's determination to get the answers to the questions they have about his death and its aftermath. I believe a full public inquiry is the best way to do that."
The justice secretary announced the inquiry in a statement to the Scottish Parliament.
Mr Yousaf said all deaths in police custody were subject to a mandatory fatal accident inquiry (FAI), but that the Lord Advocate believed this would not allow all the issues to be addressed in this case.
FAIs can examine circumstances and factors leading up to a death, but not what follows later.
Mr Yousaf said the Lord Advocate had identified questions about the early stages of the post-incident management of the investigation which could not be examined in a fatal accident inquiry.
He said: "That being the case, it is imperative that the circumstances leading up to Mr Bayoh's death and the events that followed, including whether race played a part, are examined in full and in public."
He told the parliament that the primary purpose of the public inquiry would be to investigate the circumstances of the case.
But he said he had also instructed HM Inspectorate of Prisons to review deaths in prisons.
Mr Yousaf said the process of appointing the inquiry's chairperson would begin shortly.
Aamer Anwar, the family's lawyer, said: "It follows that the inquiry must identify each and every individual and organisation who must bear responsibility and accountability for this tragedy and the mishandling of the aftermath.
"We also believe that the inquiry must focus on whether institutional racism, discrimination, inequality and cultural attitudes were responsible for what occurred. To what extent did the life of Sheku Bayoh not count, or could have counted more?
"These concerns are inescapable as far as many of the core participants are concerned."
Mr Bayoh's family had initially been told in October 2018 that no criminal charges would be brought over his death.
However, two months later evidence uncovered by BBC Scotland raised fresh questions about the way he had been treated by police officers before he died in their custody.
The Disclosure investigation included evidence that the first officers on scene escalated the situation instead of trying to defuse it, and other evidence that Mr Bayoh's actions were exaggerated in official police documents.