– A group of military lawyers who work at the Guantanamo Bay prison filed a lawsuit Tuesday against the Department of Defense, saying they have been forced to live and work in facilities with dangerous levels of known carcinogens for years.

They charge that the U.S. Navy failed to properly investigate health hazards following reports of unusually high cancer cases among otherwise young and healthy personnel at Camp Justice, the war court complex where legal teams work on the cases of war-on-terror detainees.

The complaint cites the Navy’s “unreasonable delay” in assessing such known environmental hazards as mercury and formaldehyde, and its “arbitrary and capricious determination that … personnel must live and work in contaminated areas of Camp Justice before a proper investigation and appropriate ­remediation are completed.”

The presence of cancer-causing agents has long been a cause of anxiety among the military defense teams who represent the terror detainees at the remote prison.

“This really is having a human level impact on people who have signed up to do this work,” said Daniel Small, a partner at Cohen Milstein Sellers & Toll, which is working on the Guantanamo lawyers’ case without charge.

“These are soldiers, sailors, Marines who have signed up to do some of the hardest legal work that exists in my opinion in the Department of Defense, and these people deserve better,” he said. “We should be making sure that we are protecting them, taking care of these soldiers who have signed up to a fairly thankless task.”

The filing comes nearly two years after a former Guantanamo attorney asked the Pentagon in July 2015 to investigate whether the war court compound was linked to seven cases of cancer among service members and civilians who’d worked there. One of those seven people, Lt. Cmdr. William Kuebler, had cancer of the appendix and died days after the complaint was filed.

The Miami Herald, at that time, found a dozen people who’d suffered a wide range of cancers, including brain, colon, stomach and appendix cancer.

Higher-ranking officials, judges and civilian attorneys usually stay in hotel-style guest accommodations known as “hard housing” when they go to the base. But the military defense team assigned to each accused terrorist, which includes lawyers, paralegals, security officers, linguists and others, stay and work in a trailer park set up on an ­abandoned airstrip.

In addition to lead, mold and asbestos, a 2015 assessment found that “air samples tested positive for mercury and formaldehyde, and the soil samples tested positive for benzoapyrene — all carcinogenic substances,” according to the filing.

Although these carcinogens exceeded the screening levels, the Navy and Marine Corps Public Health Center said it didn’t have enough data and that the investigation was too limited to be able to assess the health risks.

Many lawyers have struggled to limit their travel to the base, live in alternative housing when they can, and reduce the number of team members they bring with them to avoid exposing them to health hazards.

“They have made the tough choice to defend their clients even when it creates risks to their health,” Small said. “But you have a professional obligation to show up and do your job in the Camp Justice offices, and appear in a Camp Justice courtroom.”