Gen. Michael Hayden, former director of the NSA and CIA, has endorsed Ohio Gov. John Kasich's presidential campaign.

The governor is mathematically eliminated from capturing the nomination outright and even trails someone no longer running for president in the total delegate count, according to RealClearPolitics' projection, but that did not deter Hayden from siding with Kasich.

"Gov. John Kasich, who served 18 years on the House Armed Services Committee, is the one candidate in the entire field with the best experience, expertise and leadership skills required to be commander in chief," Hayden said in a statement shared by the Kasich campaign. "Gov. Kasich has serious proposals to strengthen our military, defeat ISIS and stand up for freedom around the world — proposals that rise far above bumper-stickers and amateur rhetoric."

Hayden helped develop, and is a proponent of, some of the NSA's controversial surveillance techniques. Texas Sen. Ted Cruz has co-sponsored legislation that curbed the NSA's surveillance authorities, while Donald Trump has indicated he would be comfortable with bulk data collection. Hayden has suggested that the U.S. military would ignore some of Trump's orders if he followed through on the rhetoric he has spewed on the campaign trail.

Kasich, who has lost more than 30 presidential preference votes in states across the country this primary season, has expressed a desire to balance concerns about civil liberties and national security when the federal government conducts surveillance.

The governor is off the campaign trail and will deliver his State of the State address in Ohio on Wednesday.