A man who admitted to fatally shooting a person in the back on a street outside a child's birthday party has won bail after almost seven years in custody.

In its decision Thursday, the Ontario Court of Appeal ruled that keeping Robert Hope in prison pending a new second-degree murder trial, as the prosecution wanted, would be an affront to public confidence in justice.

Hope, then 26, of Fort Erie, Ont., was convicted of second-degree murder in March 2013 for killing Tyrone Johnston — a man known for unprovoked violence — using an illegal firearm in Niagara Falls. He was given life without parole for 11 years.

Last month, however, the Court of Appeal quashed the conviction and ordered a new trial on the basis that the judge had failed to properly instruct the jury on Hope's claim he was acting in self-defence.

"The public would understand that Mr. Hope has reacquired the presumption of innocence," Justice Gloria Epstein wrote in her bail decision. "It would also understand that while his evidence protesting his innocence was disbelieved by the jury at his first trial, that jury did not have the benefit of proper instructions on the defence of self-defence."

In considering his bail application, the Appeal Court noted that a new trial could take a year or more to start, and that this is the first time he has applied for bail since his arrest in January 2010.

The court also took into account his aboriginal heritage — something Ontario courts have considered to be a relevant consideration.

The prosecution's case has also weakened with the passage of time and is, at this point, "not overwhelming," the Appeal Court said.

"The record contains evidence capable of supporting the defence of self-defence."

In weighing the pros and cons of his interim release, the court said Hope had supporters in the community — including his fiancee of seven years — who were able and willing to help him find a place to live and work.

The court rejected prosecution concerns that Hope, as an aboriginal, could easily flee to the United States. For one thing, he travelled to the U.S. after the killing and came back voluntarily before his arrest, Epstein noted. He also had no relevant criminal record before his murder conviction and has been a model prisoner, she said.

"He has already served almost seven years," Epstein wrote. "To detain Mr. Hope, who is presumed to be innocent for at least two more years pending the determination of the trial, would in my view be perceived by an informed and dispassionate public to be unfair and contrary to our society's sense of justice."

Epstein concluded that releasing Hope on a "modest" $5,000 cash bail along with pledges from aboriginal sureties involving equity in their on-reserve homes was appropriate. She rejected prosecution concerns that the government might not be able to collect from the sureties given Indian Act prohibitions.