A federal appellate court rejected an appeal Tuesday by former West Valley City narcotics detective Shaun Cowley, who was fired after he shot and killed Danielle Willard during a drug investigation in 2012.

The ruling by the 10th U.S. Circuit Court of Appeals might bring to an end to almost seven years of litigation stemming from Willard’s death. The ruling said West Valley City gave Cowley due process when it terminated him and that Cowley couldn’t show evidence that he was retaliated against for exposing misconduct in the narcotics unit. The Denver-based court also denied Cowley’s request for the city to pay his attorney fees.

A lawyer for Cowley, Tyler Ayres, said Tuesday afternoon he had not yet had a chance to read the ruling and declined to comment. West Valley City spokeswoman Roxeanne Vainuku issued a short statement, saying the city is “pleased with the ruling” and agrees with it.

Melissa Kennedy, Willard’s mother, said she liked the ruling as well. "Most of the people that know about this case say Cowley is a coward,” Kennedy said in a statement, "and he should never be able to be in law enforcement ever again.”

On Nov. 2, 2012, Cowley and his partner on the Neighborhood Narcotics Unit, Kevin Salmon, suspected Willard of buying drugs. They tried to stop her from driving away in her car.

Courtesy photo Danielle Willard, 21, was shot and killed Nov. 2 by West Valley City Police detectives during an investigation at an apartment complex. On March 21, 2013, WVC police identified the two officers who shot Willard.

As the 21-year-old Willard backed her Subaru Forester out of the parking spot, Cowley, he would say later, feared she was trying to run over him. Both he and Salmon fired their weapons. A Cowley bullet struck Willard’s head; Salmon’s grazed her chin.

The investigations that followed examined the two detectives and the narcotics unit. Investigators, with Cowley’s assistance, found detectives failed to book drugs and cash into evidence and sometimes kept suspects as informants rather than reporting them to federal authorities. West Valley City fired Cowley in October 2013 for the policy violations, leading to his contention that the city fired him as retaliation for whistleblowing.

He appealed his termination and won his job back after the city’s Civil Service Commission ruled in May 2014 that while he violated police policies, his termination was unwarranted.

Cowley returned to work in June 2015, but quit three days later, alleging in his February 2016 lawsuit against the city that he “faced a hostile work environment.”

Federal Judge Bruce Jenkins dismissed the claims the 10th Circuit addressed Tuesday. Cowley and West Valley City reached a settlement on another claim — that the city violated Cowley’s Fourth Amendment rights by searching his locker.

Meanwhile, Salt Lake County District Attorney Sim Gill charged Cowley with manslaughter. A judge later dismissed that charge for lack of evidence.

About 125 criminal cases were dismissed as a result of problems with the narcotics squad, though some later were refiled after further investigation by other officers. In September 2017, West Valley City paid a total of $650,000 to settle two lawsuits from plaintiffs who said narcotics officers violated their rights in separate episodes in 2012.

Willard’s estate sued the city and settled her case in 2015 for $1.425 million.