One of the greatest honors of my life was walking across the stage at the F.B.I. Academy and receiving my special agent badge from the director at the time, Robert Mueller. After 21 weeks of intensive training, my class swore an oath and became federal agents entrusted with the solemn duty of protecting Americans and upholding the Constitution.

After more than a decade of service, which included investigating terrorism, working to rescue kidnapping victims overseas and being special assistant to the director, I am reluctantly turning in my badge and leaving an organization I love. Why? So I can join the growing chorus of people who believe that the relentless attacks on the bureau undermine not just America’s premier law enforcement agency but also the nation’s security. My resignation is painful, but the alternative of remaining quiet while the bureau is tarnished for political gain is impossible.

A small number of my current and retired colleagues have said that we should simply keep our heads down until the storm passes. I say this with the greatest respect: They are wrong. If those who know the agency best remain silent, it will be defined by those with partisan agendas.

F.B.I. agents are dogged people who do not care about the direction of political winds. But to succeed in their work, they need public backing. Scorched-earth attacks from politicians with partisan goals now threaten that support, raising corrosive doubts about the integrity of the F.B.I. that could last for generations.