Canadian authorities have launched an investigation into the case of an indigenous woman being shackled and forced to be in the same prison as her rapist.

The woman, identified as Angela Cardinal though her real name has not been revealed, was attacked in 2014 in the city of Edmonton. At the time, Cardinal was homeless and was sleeping in the stairwell of an apartment building when she was attacked by a man holding a knife to her throat.

The attacker, named Lance David Blanchard, then dragged her up by her hair to his apartment and sexually assaulted her. When she tried to fight back, he repeatedly stabbed her.

The woman managed to call for help and first responders found her covered in blood, wounds and bruises from head to toe, the Guardian reported.

The woman was reportedly kept in a cell after she failed to answer questions as she was having trouble focusing, and was falling asleep during the first day of testimony. Under Canadian law, a witness can be detained if he/she refuses to answer questions.

She was kept in a cell next to her rapist for five days and was also transported to court in the same van as him.

The victim had angrily said to Alberta court Judge Raymond Bodnarek in 2015: "It's not a pleasant scene I'm living. I'm the victim and look at me, I'm in shackles. Aren't you supposed to commit a crime to go to jail?"

She had also requested the court to give her permission to stay with her mother and promised to return to court to answer questions. But the judge refused her plea, thinking the woman would prove a flight risk.

The case has now triggered a nation-wide outrage.

Alberta Justice Minister Kathleen Ganley apologised to the woman's family on Monday (6 June) and said: "The facts of this case are disturbing and tragic, and when you add in the treatment of the victim in the system, they are almost incomprehensible." She added that "both policies and people failed in this case".

The victim – who belonged to a member of the Cree tribe – died later in an unrelated shooting.

Blanchard was eventually found guilty of aggravated sexual assault, kidnapping and unlawful confinement. He now faces charges of attempted murder, kidnapping, unlawful confinement, aggravated sexual assault, possession of a prohibited weapon, uttering threats to cause death or bodily harm and three counts of breaching conditions of a recognizance.

On Monday (5 June), Justice Minister Ganley said that apart from launching an independent investigation into the case, a committee that consists of representatives from the justice system had been set up to explore the gaps in policy that might have given rise to the woman's treatment.

"She was the victim of a horrific crime. And when she came to the justice system, we failed to treat her with the respect and dignity she deserved," Ganley added.

The minister also raised the possibility that institutional racism might have played a role in the case as she said that she had never heard of any other accuser being treated in this way in her entire career.