A Roman Catholic priest has filed a lawsuit against Defense Secretary Chuck Hagel and Navy Secretary Ray Mabus after government officials threatened to arrest him if he fulfilled his duties as a military chaplain during the government shutdown.

Father Ray Leonard serves as Catholic pastor for the U.S. Navy's submarine base at Kings Bay, Ga., near the Georgia-Florida line. He is a civilian who works under contract for the Pentagon.

"Father Leonard wishes to continue practicing his faith and ministering to his faith community free of charge on the Naval Submarine Base Kings Bay during the government shutdown, but has been told that he is subject to arrest if he does so," the complaint, filed in the D.C. District Court, says.

Leonard was also locked out of the chapel. The complaint says that officials cited the federal Antideficiency Act, which bans government employees from working (even on a volunteer basis) during a government shutdown, as the reason for the lockout.

The policy isn't being applied consistently, though. "The Kings Bay Chapel remains open to other faiths and is being used for their religious services," according to the complaint. "The Department of Defense has allowed the Protestant community to continue their services in the chapel during the government shutdown, without threat of penalty."

Leonard, who filed the lawsuit jointly with a parishioner, wants the court to rule that the Antideficiency Act may not be used to prevent military chaplains from working during a shutdown on the theory that it violates the First Amendment rights of the religious leaders and congregants.