CINCINNATI (CN) – A Michigan man jailed for two years for attempted murder and later exonerated because of a Facebook-backed alibi prevailed Wednesday in a civil case against Detroit police officers who had asked a judge not to find them liable for falsely arresting him.

A Sixth Circuit panel led by U.S. Circuit Judge Alice Batchelder affirmed a district court judge, denying immunity to investigating officer Latonya Moses for malicious prosecution and police officers Jade Tanguay, Richard Lucas, Marshall Dennis, and Calvin Washington for Derrick Bunkley’s false arrest claims.

Bunkley, then 22, was arrested in May 2014 and charged with attempted murder after Paris Ainsworth, 51, survived a shootout with two assailants, one of whom shot her in the stomach outside her home on Beaverland Street in Detroit.

Officers arrested Bunkley while he was visiting his father Charles Knox Sr., who was also a victim of gun violence and was having his leg treated at Sinai-Grace Hospital, where Ainsworth was also receiving medical attention.

Officers jumped to the conclusion that Bunkley and his father had committed the crime because Ainsworth had described her attackers as African-American men wearing dark clothing. Bunkley and his father, however, did not otherwise fit the description the victim had given to police.

No weapon was found, and no forensic or physical evidence connected Bunkley to the shooting. At the time of the incident, Bunkley was four miles away in his mother’s house playing video games with his younger brothers, where he created a cast-iron alibi by posting images on Facebook.

Bunkley’s father, meanwhile, was picked up by an ambulance seven miles away from Ainsworth’s home at the time of the shooting. While the victim had identified Bunkley from a photo array, she had rejected a picture of Knox Sr., telling officers that he was too old. Moses never mentioned this information to prosecutors and during the trial said Bunkley’s mother had changed the time stamp on the Facebook photos.

Bunkley was convicted for assault with intent to commit murder and spent two years in prison before he was exonerated after a forensic analysis of the Facebook photos confirmed his alibi. His father was arrested but never charged.

In May 2016, Bunkley sued Moses and the other arresting officers, and a federal judge declined to grant them immunity.

Judge Batchelder upheld the ruling in a 17-page opinion Wednesday, rejecting the officers’ claim that they were only following orders.

The officers could not hide behind a shield of immunity, the Cincinnati-based appeals court found, because they had arrested Bunkley and his father without questioning Bunkley about the shooting beforehand and falsely claimed over his protests that he had violated parole.

According to the ruling, Moses had withheld evidence of the Facebook-backed alibi and falsely claimed that Bunkley and his father had come to the hospital together. In fact, Bunkley had rushed there after he learned his father had been wounded. Moses also claimed that security had detained Bunkley when he was actually sitting in a waiting area, the 17-page opinion states.

None of the officers had probable cause to arrest Bunkley because they did not investigate the scene, positively identify the assailants or question either Bunkley or his father before arresting them, Batchelder wrote.

“Any of these officers had time to stop, intervene, and prevent this arrest-without-probable-cause,” the judge said.

U.S. Circuit Judges Ralph Guy and John Bush joined Batchelder on the panel.