This Navy SEAL is defending our country against terrorists, but the FDNY says he’s too old — by six months and 25 days — to become a city firefighter.

Special Operations Chief Shaun Donovan, born on Sept. 11, 1981, was inspired to join the US war against terrorism after the 9/11 attacks. He enlisted after graduating from college in 2005, and has since served four combat tours in Iraq and Afghanistan, earning medals for valor.

While he was born and raised in Tucson, Ariz., his parents hailed from Staten Island and always talked about New York, Donovan told The Post.

“I always had this draw to the city, this connection, even though I never lived there,” he said. “When 9/11 happened, I knew I had to do something about it.”

With his military stint ending in 2020, the war hero hoped to pick up his public service in the FDNY, which lost 343 firefighters on 9/11.

Brooklyn firefighters, now pals, once gave his SEAL unit a piece of WTC steel as a memorial. Donovan sports a WTC tattoo.

“I believe in the city, I believe in its values and its people. I want to do my part to keep it safe,” he said.

Unable to come to New York for the firefighter exam last year while assigned to the Naval Special Warfare Basic Training Command, Donovan asked the city Department of Administrative Services for permission to take a make-up test.

His Sept. 6, 2018, email to DCAS included his date of birth. DCAS approved his request.

Donovan then used military leave to fly from San Diego to NYC — twice — paying $1,331 out of pocket for airfare alone.

He took the written firefighter exam on Oct. 25, scoring in the top 1 percent of 43,900 candidates. He returned Jan. 1 for the Candidate Physical Ability Test, a pass/fail test with eight tasks such as stair climbing, hose dragging and ladder raising. He passed.

On Feb. 1, an FDNY background investigator told him he didn’t qualify because of his age.

The firefighter “notice of exam” states that candidates must not reach age 29 by the start of the application period, April 5, 2017, but can add up to six years if serving in the military.

That made Donovan’s limit 35 years old. He was six months and 25 days over.

“It was a letdown,” he said. “I was allowed to apply and take the test. At no point was I made aware I was outside any age limit. It just seemed everything was lined up and ready to go.”

DCAS spokeswoman Jacqueline Gold said the department does not verify ages, but leaves it up to the FDNY.

“It is always painful for the city to have to reject a job candidate, especially one who is serving to protect our country. However, the rules cannot be changed for one person,” Gold said.

Fire Commissioner Daniel Nigro rejected Donovan’s appeal. The age requirement is civil service law and “not subject to interpretation,” a spokesman said, adding that Nigro cannot waive it.

The FDNY has hired many firefighters in their 30s and 40s — blacks or Hispanics whom a federal judge deemed victims of discrimination.

One of them, Hazim Tawfiq, joined at age 44, after first being rejected for having a rap sheet that included gun possession and beating subway fares. The department cited a lack of “good character” and “moral integrity,” but relented because Tawfiq was in the federal suit.

Donovan, now 37, has appealed to the city Civil Service Commission. If rejected, he may file suit, said Kevin Carroll, of law firm Wiggin and Dana, which is representing Donovan pro bono.