by JOSEPH TREVITHICK

Three months ago, Maj. Gen. James Post — the deputy chief of Air Combat Command — warned airmen that talking to Congress about the A-10 Warthog is an act of “treason.”

On April 10, the U.S. Air Force announced it had canned Post from his job.

To be sure, the flying branch doesn’t like the A-10 and is locked in a battle with legislators over the attack plane’s future. But it certainly didn’t like Post making veiled threats. He made the comments during a January gathering of airmen at Nellis Air Force Base in Nevada.

“Anyone who is passing information to Congress about A-10 capabilities is committing treason,” Post said, according to former airman Tony Carr at the blog John Q. Public, which was first to report the leaked exchange.

“If anyone accuses me of saying this, I will deny it,” Post added.

Air Combat Command oversees the bulk of the Air Force’s combat aircraft, and has long wanted to ditch the blunt-nosed Warthog to free up money for the troubled F-35 stealth fighter.

Legislators have repeatedly blocked those plans, and supporters claim that retiring the low-flying A-10 — which is designed to help out troops on the ground — will cost American lives.

“What, you ask, could motivate the Air Force to surrender its moral soul at the altar of neo-fascism?” Carr asked. “The F-35 has become a matter of total stakes for the service.”

While the F-35s are struggling to get through tests, the Warthogs are flying daily missions over Iraq and Syria. Since November, the planes have fired almost 50,000 shells from their 30-millimeter Gatling guns in strikes against Islamic State, according to a recent report from the Air Force’s command for the region.

In addition, the Pentagon has deployed A-10s to Europe. With Russia backing separatist rebels in Ukraine and even threatening to nuke Denmark, the hard-hitting jets are show of force intended to calm American allies.

But Post warned against saying anything nice about the Warthog to Congress … if you’re in the Air Force.