Jeronimo Yanez, seen here at a police memorial event in May, is the officer who fatally shot Philando Castile during a traffic stop last week in St. Paul, Minn. (St. Anthony Police Department/St. Anthony Police Department)

They were considered model students by their faculty, who thought the two young classmates showed the leadership and character for a career as police officers.

Jeronimo Yanez and Joseph Kauser received degrees in enforcement together in 2010 from Minnesota State University at Mankato, where they were each named among the top of their class, earning the Baton of Honor award. Yanez graduated cum laude.

Yet on Wednesday the two officers, four-year members of the St. Anthony police department in the Twin Cities suburbs, became central figures in the latest incident to spark national protest and criticism over the treatment of black people by police officers.

Shortly after the two officers stopped a vehicle, Yanez opened fire on the driver, Philando Castile, 32, who sat in the front seat. His girlfriend, Diamond Reynolds, soon began broadcasting the final moments of his life on Facebook as her 4-year-old daughter sat in the back seat.

Reynolds said that Castile had told the officers during the stop that he had a gun with him that, according to family members, he had a permit for.

“I told him not to reach for it!” Yanez can be heard shouting in the video. “I told him to get his hands up.”

Reynolds responded, “He was just getting his license and registration, sir.”

Castile was shot five times, his family said. Police report that a gun was recovered from the scene.

The Hennepin County medical examiner announced that Castile’s death has been ruled a homicide, and in a statement, the Minnesota Department of Public Safety’s Bureau of Criminal Apprehension announced that the incident is under investigation. Both Yanez and Kauser, who was also present during the shooting, have been placed on administrative leave.

The incident shocked Jeff Bumgarner, a former department chair at Minnesota State who taught Yanez in classes on policing. Bumgarner, who teaches at North Dakota State University, said Yanez was admired by his classmates and professors for his “servant’s heart.”

“He was extremely polite,” Bumgarner said. “He had a real sincere interest in public service. He seemed to be going into law enforcement for the right reasons.”

An example of his character, Bumgarner said, was the Baton of Honor, given each semester to the top students majoring in law enforcement.

“He was extremely friendly and helpful to others,” Bumgarner said. “He was exactly what you want to see in someone going into law enforcement.”

Bumgarner, a well-known criminal justice scholar, said he was not aware of the circumstances of the Castile shooting.

The notion that the reason for the shooting was racially motivated, Bumgarner said, “just doesn’t ring true about what I know about Jeronimo.”

Thomas Kelly, an attorney representing Yanez, said that the officer had left town to be with his wife and child. Kelly said Yanez, who is Hispanic, “is not a racist, and this incident had nothing to do with race and had everything to do with the presence of a gun, and the presence of that gun, permitted or not, was what led to the driver being shot.”

Kelly said that when he met Yanez hours after the incident at the police department, the officer was still shaken.

“He was very upset about this whole incident, and he remains that way,” Kelly said. “He was distraught, anxious and stressed and feeling the effects of his trauma.”

Kelly said that Yanez has no disciplinary actions in his employee file at the department, and court records show he has not faced any civil lawsuits.

“He is a sensitive and caring individual, and he has demonstrated that sensitivity and caring in his whole career in St. Anthony,” Kelly said. “He’s well liked by the community.”

Kelly declined to go into detail about the case, but he did note that Castile’s broken taillight “was not the only reason for the stop.” According to local news reports, Castile matched the description of a robbery suspect.