When Christopher Fuller and his research team received a “stop work order” on New Year’s Eve, they had four hours to shut down their lab, making sure their chemical and biological samples were securely stored in refrigerators that would keep running if the electricity was shut off.

Mr. Fuller had spent the previous few months with the Environmental Protection Agency in Durham, N.C., studying approaches to decontamination after a biological weapons attack. He is one of legions of contractors hired by the federal government who are suddenly out of work because of the shutdown.

As the shutdown has dragged on to become the longest in American history, these contractors have found themselves in the same predicament as the roughly 800,000 federal employees who are not being paid — except the outcome may be worse. Many contract workers, unlike federal employees, do not expect to be reimbursed for unpaid wages once President Trump and Congress agree to reopen the government.

“We are the ones that do the research and gather the data alongside federal workers,” Mr. Fuller said, “yet we don’t have the same safety net or same visibility.”