Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Former FBI Director James Comey was widely admired by agents who worked for him, winning high scores in anonymous surveys for his values and trustworthiness, even as he became embroiled in controversies over investigations related to the 2016 election.

Comey was fired in May by President Donald Trump, who called him a "showboat" and a "grandstander," suggested he was incompetent and described the FBI as "in turmoil" under his leadership.

Afterwards, White House spokesperson Sarah Huckabee Sanders said she'd talked to “countless” FBI agents who were happy with Comey's removal. “I have heard from a large number of individuals that work at the FBI that said they are very happy with the president’s decision,” she told reporters.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The survey, released by the FBI Wednesday, paints a different picture.

Related: Timeline: What Led to FBI Director James Comey’s Firing

The agents, along with civilian FBI employees, were questioned about Comey in March 2017, around the time Comey first publicly confirmed that the FBI was investigating whether the Trump campaign colluded with Russian attempts to influence the 2016 election. In testimony to Congress, Comey also debunked Trump's claim that former President Barack Obama had wiretapped Trump Tower. Those remarks marked a turning point in Comey's relationship with Trump.

By then, the uproar over Comey's late-2016 public statements about the FBI's probe of Hillary Clinton's use of a private email server ─ which Clinton has said contributed to her defeat ─ was several months in the past.

Related: James Comey, Ex-FBI Chief, Has a Book Deal; Publication Set for Next Spring

The annual survey asks agents to rate their director on a scale of one to five on various aspects of his leadership and personality. Anything over a 3.81 average is considered a success.

President Donald Trump and then-FBI director James Comey in January, before their relationship soured. Andrew Harrer / Pool via Getty Images

Agents found Comey to be confident in his ability, giving him a 4.85 score. They gave him a 4.79 for his "calm demeanor in stressful situations,” a 4.75 for "personal characteristics and values," and a 4.47 for "trust and confidence in this person as a leader."

Asked if they would choose to work with Comey again, the agents gave him an average score of 4.48. Asked if they agreed with what Comey was trying to accomplish, they gave him a 4.79.

The survey wasn’t all rosy for Comey. His scores generally trended downward from 2015 onward, according to the survey. One of his lowest scores, a 3.78, was for “engages me in meaningful conversations about my performance and development.”