A traitorous former Air Force specialist ​from New Jersey tried to join ISIS in January after getting canned from his job as an airplane mechanic in Kuwait, federal authorities in Brooklyn charged Tuesday.

Tairod Nathan Webster Pugh, 47, of Neptune, traveled from Egypt to Turkey “in an effort to cross the border into Syria to join ISIL and fight violent jihad,” officials said after unsealing his indictment, using the other popular acronym for ISIS.

“There are only 2 possible outcomes for me,” he once wrote on his Facebook page. “Victory or Martyr.”

Skeptical Turkish officials stopped him from entering Syria at the border and deported him back to Egypt. Authorities there shipped him to New Jersey, where he was arrested on Jan. 16, court papers state.

Prosecutors said that a probe of Pugh’s laptop revealed extensive Web searches related to ISIS, and that he also was carrying USB drives, a wiped iPod and a photo of a machine gun on a cell phone. Backpacks belonging to Pugh also contained a solar-powered flashlight, a pair of compasses and camping gear.

“Born and raised in the United States, Pugh allegedly turned his back on his country and attempted to join a terrorist organization,” US Attorney Loretta Lynch said in a statement. “We will continue to vigorously prosecute extremists, whether based here or abroad, to stop them before they are able to threaten the United States and its allies.”

Pugh served in the Air Force from 1986 to 1990 and was trained in aircraft maintenance and weapons systems, court papers state. He converted to Islam in 1998 and worked for several different airlines as a mechanic, papers state.

He first appeared on law- enforcement radar in 2001 after a co-worker at American Airlines told authorities he expressed sympathy for Osama bin Laden and held virulent anti-American beliefs.

Pugh bounced between several aviation jobs in the Middle East for the past 18 months before he was terminated from his most recent position in Kuwait, papers state.

In a letter to his wife in January, Pugh expressed his desire to wage jihad, according to court papers.

“I am a sword against the oppressor and a shield against the oppressed,” he wrote.

He is scheduled to be arraigned Wednesday morning in Brooklyn federal court, and faces up to 35 years in prison if convicted of the terror raps.