A Minnesota state board wrongly denied a teaching license to Jeronimo Yanez, the former police officer who shot and killed Philando Castile in 2016, a state court ruled Tuesday.

Yanez, who was acquitted of manslaughter charges in the Castile case, applied for a substitute teaching job in 2020, but was denied. The state board listed the reason for his rejection as "immoral character or conduct," but a Minnesota Court of Appeals now says that reason is too vague.

"The board’s decision must focus exclusively on Yanez’s conduct and his fitness to be a teacher, not fitness to be a police officer," the ruling states, adding that any rejection must establish that Yanez "violated moral standards for the teaching profession."

The shooting of Castile, a black man, inside his car sent waves of protest across the country. Yanez argued that Castile had a firearm and that he feared for his own safety, but Castile was later shown to have a permit for the gun.

AUTHORITIES IDENTIFY OFFICER JERONIMO YANEZ AS MAN WHO FATALLY SHOT BLACK MAN IN MINNESOTA

FILE - In this May 30, 2017, file photo, St. Anthony police officer Jeronimo Yanez stands outside the Ramsey County Courthouse while waiting for a ride in St. Paul, Minn. Closing arguments are set for Monday, June 12, in a Minnesota police officer’s manslaughter trial in the death of a black motorist. (David Joles/Star Tribune via AP, File)

Minnesota police officer Jeronimo Yanez was acquitted of manslaughter in the shooting death of motorist Philando Castile. (Star Tribune via AP)

FILE - In this July 25, 2016, file photo, a memorial including a photo of Philando Castile adorns the gate to the governor's residence where protesters continue to demonstrate in St. Paul, Minn., against the July 6 shooting death of Castile by St. Anthony police Officer Jeronimo Yanez during a traffic stop in Falcon Heights, Minn. The city of St. Anthony released a statement Wednesday, Aug. 24, 2016, saying that Yanez is back on administrative leave "after reviewing concerns and other feedback from the community." Yanez returned to work for the first time last week following the death. (AP Photo/Jim Mone, File)

A memorial including a photo of Philando Castile adorns the gate to the governor's residence in St. Paul, Minn. (Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistribu)

Castile's girlfriend was in the car with him along with her then 4-year-old daughter at the time of the  shooting she and streamed the aftermath of Castile's shooting live on Facebook. Yanez shot Castile, a 32-year-old elementary school cafeteria worker, several times during the incident.

MINNEAPOLIS TO PAY MORE THAN $700,000 OVER POLICE BRUTALITY AT GEORGE FLOYD PROTESTS

Following his acquittal, Yanez took a buyout from his former police department and left the force in 2017.

"Since Officer Yanez was not convicted of a crime, as a public employee, he would have appeal and grievance rights if terminated," the city said in a statement at the time. "A reasonable voluntary separation agreement brings to a close one part of this horrible tragedy. The City concluded this was the most thoughtful way to move forward and help the community-wide healing process proceed."

Diamond Reynolds recounts the incidents that led to the fatal shooting of her boyfriend Philando Castile by Minneapolis area police during a traffic stop on Wednesday, at a "Black Lives Matter" demonstration in front of the Governor's Mansion in St. Paul, Minnesota, U.S., July 7, 2016. REUTERS/Eric Miller - S1AETOFYLBAA

Diamond Reynolds recounts the incidents that led to the fatal shooting of her boyfriend Philando Castile by Minneapolis area police during a traffic stop on Wednesday, at a "Black Lives Matter" demonstration in front of the Governor's Mansion in St. Paul, Minnesota, U.S., July 7, 2016.  (REUTERS/Eric Miller)

CLICK HERE FOR THE FOX NEWS APP

The protests following Castile's death proved to be only a preview of what Minnesota and the country would endure following the police killing of George Floyd in 2020. Floyd's murder would end in a conviction, however, for the Minnesota police officer in that case, Derek Chauvin.

The Associated Press contributed to this report.