The Justice Department’s high-profile Espionage Act case against me collapsed on July 15, with all 10 felony charges dropped, when I was sentenced to community service after entering into a plea agreement for a minor misdemeanor. During the sentencing hearing, the judge clearly set the tone for holding the executive branch of our government accountable. He expounded on the judicial branch’s role as final arbiter of the law, while noting that the basis for the American Revolution was British tyranny in the colonial era.

Over more than a year, my case became a disturbing illustration of “off the books,” irresponsible government behavior that is increasingly alien to the Constitution. The government’s penchant since Sept. 11, 2001, for operating in secrecy and hiding behind an executive branch “state secrets” doctrine has damaged our long-term national security and national character. It has, by sacrificing Americans’ general welfare and civil liberties, given rise to a persistent military-industrial-intelligence­con­gressional surveillance complex.

From 2001 through 2008, I was a senior executive at the National Security Agency. Shortly after Sept. 11, I heard more than rumblings about secret electronic eavesdropping and data mining against Americans that bypassed the Fourth Amendment and the Foreign Intelligence Surveillance Act — the exclusive means in the law for conducting such activity, with severe criminal sanctions when violated. Such shortcuts were not necessary. Lawful alternatives — using the best of Americans’ ingenuity and innovation — existed that would have also vastly improved our intelligence capability against legitimate threats. A highly innovative intelligence data collection, processing and analysis system called ThinThread was operationally ready and had built-in safeguards to comply with the Fourth Amendment. But this revolutionary system was rejected by the NSA while much higher-cost work on the multibillion-dollar flagship Trailblazer program proceeded.

While at the NSA I became a material witness and whistleblower for two Sept. 11 congressional investigations starting in late 2001 and through the summer of 2002, and then for a multi-year audit by the Defense Department inspector general of the failed Trailblazer program and the ThinThread alternative from 2003 until 2005 — after a Defense Department hotline complaint was made by three former NSA employees and a House intelligence committee staffer in September 2002.

I raised the gravest of concerns through all the proper channels, reporting massive contract fraud, management malfeasance and illegalities conducted by the NSA, including critical intelligence information and analysis that was never reported or shared by the NSA. Had this vital and actionable intelligence been properly analyzed and disseminated by the NSA, it could have led to the capture of the Sept. 11 hijackers and prevented the attacks.

I followed all the rules for reporting such activity until it conflicted with the primacy of my oath to defend the Constitution. I then made a fateful choice to exercise my fundamental First Amendment rights and went to a journalist with unclassified information about which the public had a right to know.

Rather than address its own corruption, ineptitude and illegal actions, the government made me a target of a multi-year, multimillion-dollar federal criminal “leak” investigation as part of a vicious campaign against whistleblowers that started under President George W. Bush and is coming to full fruition under President Obama.

To the government, I was a traitor and enemy of the state. As an American, however, I could not stand by and become an accessory to the willful subversion of our Constitution and our freedoms.

It is a basic precept when taking the oath to defend the Constitution as a government employee and providing for the common defense that you do not sell out intelligence or national security to the highest bidder, or keep our nation’s decision makers in the dark, or turn information into a political tool and, driven by self-interest, use it to hammer whistleblowers.

Such egregious behavior sends a chilling message about what the government can and will do to those who speak truth to power — a direct form of political repression and censorship.

Once exposed, these unconstitutional detours are justified by vague and undefined claims of “national security,” aided and abetted by officials’ shameless fear-mongering while they cover up their own actions and keep them secret from the public.

The real consequence of such behavior by our government is also chilling: It weakens our national security and keeps the public less informed, while wasting billions of dollars enriching any number of contractors that are profiteering at the expense of our security and common defense.

Before the war on terrorism, our country recognized the importance of free speech and privacy. If we sacrifice these basic liberties, according to the false dichotomy that such is required for security, then we transform ourselves from an oasis of freedom into a police state that crucifies its citizens when they step out of line or speak up against government wrongdoing. These are the hallmarks of despotism, not democracy. Is this the country we want to keep?

Thomas Drake, a former senior executive at the National Security Agency, received the 2011 Ridenhour Truth-Telling Prize.