For the past few days, the nation’s media and political class have been fixated on the firing of the No. 2 person in the FBI, Deputy Director Andrew McCabe. McCabe became embroiled in the investigation of President Donald Trump because of his alleged approval of the use of a political dossier, written about Trump and paid for by the Democrats and not entirely substantiated, as a basis to secure a search warrant for surveillance of a former Trump campaign adviser who once boasted that he worked for the Kremlin at the same time that he was advising candidate Trump.

The dossier itself and whatever was learned from the surveillance formed the basis for commencing the investigation of the Trump campaign’s alleged ties to Russia by the Obama Department of Justice, which is now being run by special counsel Robert Mueller and has been expanded into other areas. The surveillance of the Trump campaign based on arguably flimsy evidence put McCabe into President Trump’s crosshairs. Indeed, Trump attacked McCabe many times on social media and even rejoiced when Attorney General Jeff Sessions fired him at 10 p.m. last Friday, just 26 hours before his retirement was to have begun.

Why the fixation on this? Here is the back story.

After the unlawful use of the FBI and CIA by the Nixon administration to spy on President Nixon’s domestic political opponents, Congress passed the Foreign Intelligence Surveillance Act in 1978. This statute outlawed all domestic surveillance except that which is authorized by the Constitution or by the new Foreign Intelligence Surveillance Court.

That court, the statute declared, could authorize surveillance of foreigners physically located in the United States on a legal standard lesser than that which the Constitution requires. Even though this meant Congress could avoid the Constitution -- an event that every high school social studies student knows is unconstitutional -- the FISC enthusiastically embraced its protocol.

That protocol was a recipe for the constitutional crisis that is now approaching. The recipe consists of a secret court whose records and rulings are not available to the public. It's a court where only the government’s lawyers appear; hence there is no challenge to the government’s submissions. And it's a court that applies a legal standard profoundly at odds with the Constitution. The Constitution requires the presentation of evidence of probable cause of a crime as the trigger for a search warrant, yet FISA requires only probable cause of a relationship to a foreign power.

In the years in which the FISC authorized spying only on foreigners, few Americans complained. Some of us warned at FISA’s inception that this system violates the Constitution and is ripe for abuse, yet we did not know then how corrupt the system would become. The corruption was subtle, as it consisted of government lawyers, in secret and without opposition, persuading the FISC to permit spying on Americans.

The logic was laughable, but it went like this: We need to spy on all foreigners, whether they're working for a foreign government or not; we need to spy on anyone who communicates with a foreigner; and we need to spy on anyone who has communicated with anyone else who has ever communicated with a foreigner.

These absurd extrapolations, pressed on the FISC and accepted by it in secret, turned FISA -- a statute written to prevent spying on Americans -- into a tool that facilitates it. Now, back to McCabe.

Though the use of FISA for domestic spying on ordinary Americans came about gradually and was generally known only to those in the federal intelligence and law enforcement communities and to members of the Senate and House intelligence committees, by the time McCabe became deputy director of the FBI, this spying was commonplace. The Foreign Intelligence Surveillance Court (is it really a court, given that its rulings are secret and it hears only the government and it rejects the constraints of the Constitution?) has granted 99.9 percent of government surveillance requests.

So when McCabe and his colleagues went to the FISC in October 2016 looking for a search warrant to conduct surveillance of officials in the Trump campaign, they knew that their request would be granted, but they never expected that their application, their work and the purpose of their request -- as far removed as it was from the original purpose of FISA -- would come under public scrutiny.

Indeed, it was not until the surveillance of Trump and his colleagues in the campaign and the transition came to light -- with McCabe as the poster boy for it -- that most Americans even knew how insidiously governmental powers are being abused.

The stated reason for McCabe’s firing was not his abuse of FISA but his absence of candor to FBI investigators about his use of FISA. I don’t know whether those allegations are the true reasons for his firing or McCabe was sacrificed at the altar of government abuse -- because those who fired him also have abused FISA.

But I do know that there are lessons to learn in all this. Courts are bound by the Constitution, just as are Congress and the president. Just because Congress says something is lawful does not mean it is constitutional. Secret courts are the tools of tyrants and lead to the corruption of the judicial process and the erosion of freedom.

And courts that hear no challenge to the government and grant whatever it wants are not courts as we understand them; they are government hacks. They and the folks who have facilitated all this have undermined personal liberty in our once free society.

The whole purpose of the Constitution is to restrain the government and to protect personal liberty. FISA and its enablers in both major political parties have done the opposite. They have infused government with corruption and have assaulted the privacy of us all.