There’s a proper way for a CIA whistleblower to complain about a president. The anonymous CIA whistleblower who set off the Ukraine impeachment brouhaha did it wrong.

I would know — because I’m a former CIA officer who filed a whistleblower complaint against the Clinton White House and CIA management.

The charges lodged by “EC,” the rumored initials of the Ukraine complainant, fall far short of a bona fide whistleblowing complaint. EC’s behavior suggests that he has abused his office, and perhaps broken the law, by using his CIA position to damage President Trump politically.

In 1996, I sent my complaint to then-CIA Director John Deutch and asked him to forward it to the House and Senate Intelligence Committees and several other members of Congress. I sent copies to about six other senior CIA officials, including the director of security and the inspector general.

Because of the serious nature of my charges and to take full responsibility, I didn’t hide behind anonymity. I signed my complaint.

I was informed that Deutch took my complaint seriously. I was told that I could bring my concerns to Congress or, if I wished, Deutch would ask the CIA inspector general to look into my complaint.

I took up the CIA’s offer to send my complaint to the IG, because I believed management would ensure a fair and honest investigation. After I agreed to share my concerns with the IG, the agency sent both congressional intelligence committees a vague notification of my complaint.

The subject matter was — and remains — classified. So I also decided to use the IG route to keep my complaint secret.

Unlike EC, I didn’t try to score political points. I only wanted to raise concerns about wrongdoing that I believed threatened US national security. It was clear that my charges would embarrass the Clinton administration and CIA management if made public. But an intelligence professional should never intervene in domestic politics.

My complaint has been kept out of the media for 23 years — until this op-ed.

Unfortunately, the CIA IG investigation of my whistleblowing complaint was far from fair and honest. It was an 18-month battle against bullying and stonewalling by the IG staff.

Eventually, my attorney and I met with the staff of the Senate Intelligence Committee. Unlike EC, who met only with the House Democratic staff, my meeting included staff from both parties.

The CIA IG told my attorney and me that it planned to close my case with a very biased and incomplete report.

But I still went through proper channels. I rejected the IG’s decision and threatened to file a formal complaint with Congress. With that, both sides agreed to close the IG inquiry without a final report.

This was an acceptable outcome for me, since I made my point and used the time afforded by the lengthy IG investigation to move on with my career. I worked for the CIA for another eight years.

I paid a professional price for speaking out. Vengeful supervisors dragged out my promotions, denied me bonuses and blocked me from choice assignments for which I was qualified. I accepted this, because I regarded working for the CIA to be a great honor, and I couldn’t live with myself ignoring the wrongdoing I had witnessed.

Things are different today. House Democratic members and EC’s lawyers claim the whistleblower’s identity must be secret for fear of professional retaliation and physical threats.

This excuse is hard to take seriously. EC’s likely identity is already public. Fears of physical safety are empty political theater; EC is just one of hundreds of thousands of Trump haters in the Washington, DC, area.

Yes, a real intelligence professional can pay a steep price for filing a bona fide, nonpolitical whistleblowing complaint, as I did. But there’s an honorable way to do it.

EC filed no such complaint. He is a coward and a fraud. He hid. He refused to meet with bipartisan lawmakers or staff. He appears to have collaborated in drafting his complaint with partisan House Intelligence Committee members and staff. EC has proved he is not a true intelligence professional.

Fred Fleitz, a former executive secretary of the National Security Council under President Trump, was a CIA analyst from 1986 to 2005. The CIA Prepublications Review Board reviewed and cleared this op-ed.