In fact, contingency plans from the Pentagon as well as past experience show that many parts of the military would continue to operate even if the government is temporarily closed.

“The threats never end, and so this department will never shut down,” Dana W. White, a Pentagon spokeswoman, said in December.

On Thursday, the House passed legislation to keep the government funded through Feb. 16, but Republicans were struggling on Friday to muster enough votes in the Senate to approve a similar bill before midnight on Friday. That is the deadline to approve a new spending plan — without which certain federal employees would be placed on unpaid furlough.

But the Pentagon “will, of course, continue to prosecute the war in Afghanistan and ongoing operations against Al Qaeda and the Islamic State of Iraq and Syria, including preparation of forces for deployment into those conflicts,” the deputy secretary of defense, Patrick M. Shanahan, wrote in a memo on Thursday.

“The department must, as well, continue many other operations necessary for the safety of human life or the protection of property,” he wrote.