A senior Trump appointee at an agency responsible for enforcing laws against financial discrimination apologized Monday for blog posts he wrote years ago questioning whether the n-word was racist and expressing skepticism about hate crimes, according to internal emails obtained by The Washington Post.

“Do I regret some of the things I wrote when I was 25. . . . Absolutely,” Eric Blankenstein, a policy director at the Consumer Financial Protection Bureau, wrote to colleagues. “The tone and framing of my statements reflected poor judgment.”

The apology was in sharp contrast to a defiant statement issued by Blankenstein in response to The Post’s report last Wednesday about the blog posts from 2004. “The insight to be gained about how I perform my job today — by reading snippets of 14-year-old blog posts that have nothing to do with consumer protection law — is exactly zero,” he wrote.

Blankenstein’s turnabout came just hours after a senior civil servant in the bureau, Chris D’Angelo, wrote a bureau-wide note saying that many employees under Blankenstein felt “chilled” and “threatened by the language used” in the posts and Blankenstein’s “affirmation of those posts in his public statement, and his failure to denounce those statements or acknowledge their hurtful nature.”

“Hate speech cannot be tolerated. The suggestions that a racial slur is intended to do anything other than demean and oppress on the basis of race undermines constructive discourse and is inconsistent with the consumer protection and fair lending mandates of the Bureau,” D’Angelo said in the email.

The controversy follows revelations of Blankenstein’s views on race-based laws and other matters in a political blog he co-wrote with two anonymous contributors.

In a 2004 post, Blankenstein wrote that a proposal at the University of Virginia to impose harsher academic penalties for acts of intolerance was “racial idiocy.” He questioned how authorities could know the motivation of someone using a racial slur.

“Fine . . . let’s say they called him n-----,” he wrote, spelling out the slur. “ . . . would that make them racists, or just a-------?”

Blankenstein wrote that “hate-crime hoaxes are about three times as prevalent as actual hate crimes.”

Two Senate Democrats have called for Blankenstein’s dismissal, and Blankenstein has faced a rebellion among his subordinates. On Friday, while Blankenstein and other political appointees remained silent, a senior civil servant, Patrice Ficklin, sent an email to agency staff members harshly criticizing Blankenstein’s blog posts and dozens of others responded with emails in support of Ficklin.

In his email Monday, Blankenstein was contrite, saying he “unfortunately used intentionally provocative language.”

“Poor judgment in my choice of words back then, or how I framed my arguments, does not make me racist or a sexist, and I have always rejected racism and sexism in the strongest terms possible,” Blankenstein said.

“I have never used and will never use a racial epithet to describe anyone.”

Kirsten Sutton, the agency’s chief of staff, sent an email at the same time saying the CFPB has a “zero tolerance” policy for discrimination. “The Bureau values diversity in viewpoints, backgrounds, and walks of life,” she said.

Obama administration and Congress created the CFPB after the global financial crisis to police credit card companies, payday lenders, mortgage lenders and other financial companies that interact with consumers.

At the CFPB, Blankenstein supervises lenders and enforces an array of consumer protection laws, including landmark civil rights legislation aimed at protecting minorities from discriminatory practices.