FBI Director James Comey walks to the podium to make a statement at FBI headquarters on Hillary Clinton's use of a private email server while secretary of state. (Cliff Owen/AP)

It was, say those who know him, classic Jim Comey: stern, unflinching and standing on principle — politics and position be damned.

The FBI director may not have recommended that Hillary Clinton be charged for her “extremely careless” handling of classified material — some of it top secret — but his 15-minute exposition Tuesday left the presumptive Democratic presidential candidate bruised by such a harsh and public scolding.

James B. Comey’s apparent indifference to the fact that he may be sitting across from a President Clinton in a few short months reflects not only his temperament but the institutional independence of the position he holds. Relations with a President Trump are also likely to be strained. In the wake of Comey’s announcement, the presumptive Republican nominee questioned the director’s integrity by saying the outcome was “rigged.”

“He’s not having anybody go out and say it for him,” said Robert Anderson, a former executive assistant director of the FBI’s Criminal, Cyber, Response and Services Branch who worked directly with Comey. “That takes a lot of guts, in this situation.

“He’s basically saying, ‘Hey, I’m just going to tell you the way I feel, and I know who you are and who you could be,’ ” Anderson said.

Since 1976, FBI directors have had 10-year terms and have answered to the U.S. attorney general and the White House. Comey has said he remains committed to serving his full term, which would take him beyond the four-year term of the next president unless he is fired or pressured to resign, as has happened to other directors.

Comey has a history of being blunt. He likes to deliver what he calls “hard truths.”

One came after a police officer shot and killed Michael Brown in Ferguson, Mo., in August 2014. That death sparked a national debate about how police interact with minority communities, with many in law enforcement complaining about growing anti-police sentiment. Comey did not shy away from the conversation, delivering a speech at Georgetown University the next year that rankled some of his colleagues, at the federal and local levels.

“Let me start by sharing some of my own hard truths,” he said. “First, all of us in law enforcement must be honest enough to acknowledge that much of our history is not pretty.”

He added: “At many points in American history, law enforcement enforced the status quo, a status quo that was often brutally unfair to disfavored groups.”

As scrutiny of police action intensified, Comey lent his support to the idea that crime, including homicide, might be increasing because police across the country were enforcing the law less aggressively out of fear of being captured on video and ending up in the dock.

The validity of the “Ferguson effect,” as the phenomenon was called, was not embraced by Comey’s bosses — Attorney General Loretta E. Lynch and President Obama.

“He’s earned a reputation as a straight shooter, and in a highly political city,” said Tim Weiner, author of “Enemies: A History of the FBI.”

More recently, and without notes, Comey spoke at the Defense Intelligence Agency. The event was to celebrate LGBT Pride Month, and Comey turned his gaze on diversity in his own agency. He noted that 83 percent of FBI agents were white and described those numbers as a “crisis,” according to two U.S. officials familiar with Comey’s comments.

“Our ability to be believed is at risk,” Comey told the group assembled at DIA last month. “The FBI must be able to stand on any corner in the U.S. or before any jury and be believed.”

He has also shown a willingness to look at the bureau’s record.

After last month’s Orlando terrorist attack, he acknowledged the FBI had once investigated the shooter, Omar Mateen.

“We are also going to look hard at our own work to see whether there is something we should have done differently,” he said. “. . . We will look at it in an open and honest way and be transparent about it.”

Comey’s approach has won praise within the halls of FBI’s headquarters. His agents are confident he will tackle the tough cases that make politicians and the White House uncomfortable.

He pushed for the prosecution of Sen. Robert Menendez, a powerful Democrat from New Jersey, who was indicted last year on corruption charges. He backed his agents when they sought felony charges against former CIA director David Petraeus, who was ultimately convicted of a misdemeanor for mishandling classified information that he provided to his biographer and lover.

After Clinton called the FBI investigation a security inquiry, Comey later corrected her at a news conference. He reminded reporters this was an investigation.

“It’s in our name. I’m not familiar with the term ‘security inquiry,’ ” the director said.

Weiner said Comey established a “standard of speaking truth to power in 2004 that is pretty hard to top.” The author was referring to a now famous hospital showdown during the George W. Bush administration with White House Counsel Alberto Gonzales and Andrew H. Card Jr., the president’s chief of staff.

The White House officials were trying to persuade Attorney General John D. Ashcroft, who was recovering from emergency surgery, to reauthorize a controversial warrantless domestic eavesdropping program.

Comey, who was acting attorney general in Ashcroft’s absence, had refused to agree to extend the program, because he believed it did not comply with the law.

When he learned that the White House was attempting to go around him and get the ill Ashcroft to sign off on an extension, Comey rushed to George Washington University Medical Center, arriving just before Gonzales and Card.

Comey, who had threatened to resign over the incident, has described the night as the “most difficult of my professional career.”

Comey has made it clear he wants his agents to understand the bureau’s history. He makes sure new agents and analysts are aware of the FBI’s investigation of the Rev. Martin Luther King Jr.

Comey keeps a copy of Attorney General Robert F. Kennedy’s approval of FBI Director J. Edgar Hoover’s request to wiretap King — a request Comey said was “without fact or substance.”

“One reason we cannot forget our law enforcement legacy is that the people we serve and protect cannot forget it, either,” Comey said at Georgetown. “So we must talk about our history. It is a hard truth that lives on.”

Matt Zapotosky contributed to this report.