An Ontario man set to stand trial for the second time on first-degree-murder charges in the death of Cindy Gladue turned himself in on Friday and was promptly arrested by sheriffs at the courthouse.

Bradley Barton, 49, was granted bail.

His bail conditions are subject to a publication ban. CBC News has requested the contents of the bail conditions from Alberta Justice.

In 2015, a jury acquitted Barton in the death of 36-year-old Cindy Gladue. That decision was overturned by an Alberta Court of Appeal in June, and a warrant went out for his arrest.

The case has been controversial from the beginning.

Gladue was a mother of three who worked in the sex trade. She was seen with Barton the night before her body was found in June 2011 in a blood-soaked bathtub in the west-end Yellowhead Inn.

While the Crown contended Barton killed Gladue deliberately by inflicting a wound to her vagina, the defense argued the injuries were accidental. Barton testified the injury happened during rough sex.

Cindy Gladue saskatoon

Rallies were held around Canada, including this one in Saskatoon, to protest the not guilty verdict in death of Cindy Gladue. (David Shield/CBC)

Barton's acquittal sparked angry rallies in Edmonton and across the country, with thousands calling for the decision to be overturned.

The appeal court decision, released June 30, 2017, said there were flaws in the way the jury was instructed to consider sexual assault offences and the laws relating to consent.

"These errors of law negatively compromised the jury's ability to properly assess the evidence and apply the law correctly," the court of appeal said in its decision.

The Crown and defense are scheduled to meet Sept. 1 to set a date for Barton's first-degree murder trial.