Visitors walk up the road in Arches National Park in Utah during the partial government shutdown. Some states have had to foot the bill to keep bathrooms clean and parks staffed. Rick Egan/The Salt Lake Tribune via AP

President Donald Trump’s warning that the partial federal government shutdown could last “for months or even years” has states, cities and businesses increasingly nervous.

States depend on federal money to pay for food stamps, welfare and programs such as the Child Care and Development Fund Plan, the National Flood Insurance Program and the Land and Water Conservation Fund, which provides matching grants for state and local parks and recreation projects.

Marcia Howard, the executive director of the nonprofit Federal Funds Information for States, said states have enough leftover federal dollars, plus money of their own, to keep key programs going for several weeks — but any period longer than that would create significant problems. The longest previous shutdown was for 21 days, in 1995-1996.

“We don’t know how it goes,” Howard said. “We don’t know how it gets resolved. And states are as curious as everyone else.”

In Michigan, for example, $22 billion of the $57 billion state budget comes from the federal government. A spokesman for the Michigan State Budget Office, Kurt Weiss, said the state wouldn’t face significant challenges until 45 days have elapsed. But the day that marks the end of that period, Feb. 5, is fast approaching.

“That’s when we push the panic button,” Weiss said. “We are starting to get more concerned. We need to start taking this seriously.”

Weiss’ office recently asked the heads of state agencies to assess how long they can remain open without federal dollars and which of their programs are most essential. Their responses are due Friday.

A spokeswoman for the state Department of Agriculture and Rural Development, Jennifer Holton, said her department is reevaluating its budget ahead of the deadline, but would not comment on specific programs.

"We spent a lot of money for a marketing campaign because of the black eye that the federal government imposed on us last time." Utah state Rep. Ken Ivory , on the 2013 shutdown, when his state kept national parks open

Minnesota also is trying to get a handle on how long its state agencies can operate without federal dollars. Myron Frans, the commissioner of Minnesota Management and Budget, said his state has contingency plans for short-term shutdowns that last for days, but not months.

“Those people need that money,” Frans said of the Minnesotans who depend on federally funded programs. “What do we do? How do we plan to help these people when payments get cut off?

“We need to accept the fact that this shutdown is going to last a long time.”

The federal Supplemental Nutrition Assistance Program (SNAP), better known as food stamps, is funded through the month. If the shutdown lasts longer, the benefit might be cut off, affecting about 40 million people. The Special Supplemental Nutrition Program for Women, Infants and Children, known as WIC, already ran out of money.

That has New Jersey officials concerned. A spokesman for the state Department of Human Services, Tom Hester, said if the shutdown lasts past January, it could affect 730,000 food stamp recipients and 12,600 Temporary Assistance for Needy Families (TANF) recipients in New Jersey.

“We are closely monitoring actions at the federal level and any potential impacts on New Jersey,” Hester said. He wouldn’t expand on what the state would do, however, if the shutdown lasts past the end of the month.

Federal funding for Medicaid, the joint federal-state health care program for low-income people, is not immediately in jeopardy because Congress already has approved the federal share of those payments through September.

Border States Spend to Root Out Smuggling Quick View Border States Spend to Root Out Smuggling Although the influx of illegal Mexican immigrants has subsided, states along the Southwest border face other security issues.

The shutdown effect on national parks is familiar to states. Arizona, California, New York and Utah are among those that are using state dollars to keep some of their national parks open — and protect their local tourism industries — by providing basic services such as trash pickup and restroom cleaning.

There is no guarantee that states will be reimbursed for those outlays, Howard said. It’s up to Congress to determine whether to pay back states, and though it has done so after some shutdowns, states have not always been made whole.

Four years after the two-week shutdown in 2013, for example, Arizona, Colorado, New York, South Dakota, Tennessee and Utah still hadn’t gotten paid back after shelling out millions to keep parks open.

In Utah, state Rep. Ken Ivory said the federal government still has not paid his state back for the 2013 shutdown, and he can only hope it pays Utah back for this shutdown. The biggest issue for the state now, he said, is uncertainty.

“People plan for years and years in advance to see these iconic landscapes that we have,” the Republican lawmaker said. “We spent a lot of money for a marketing campaign because of the black eye that the federal government imposed on us last time.”

The Shutdown Ended. Utah Wants Its Money Back. Quick View The Shutdown Ended. Utah Wants Its Money Back. As Congress stares down yet another deadline, state leaders once again may have to decide whether to open their own wallets to protect their local tourism industries.

As a result of the shutdown, 420,000 federal employees are working without pay and 380,000 have been furloughed, according to a Democratic report from the Senate Appropriations Committee.

The economies of Maryland, Virginia and Washington, D.C., which have the highest concentrations of federal workers, will feel the impact of those missed paychecks most acutely. But they aren’t the only places: Federal employees make up at least 3 percent of the workforce in Alaska, Hawaii, Montana, New Mexico, Oklahoma and West Virginia.

Hundreds of Marylanders are applying for unemployment insurance benefits because of the shutdown, the Baltimore Sun has found. Maryland Gov. Larry Hogan, a Republican, lambasted the shutdown’s impact on the 147,000 federal employees who live in his state, calling it “unacceptable.”

City officials across the country also are worried. Steve Benjamin, the Democratic mayor of Columbia, South Carolina, and the president of the U.S. Conference of Mayors, called the shutdown a “crisis” for cities.

Because the U.S. Department of Housing and Urban Development is closed, officials there won’t process Section 8 and veterans housing vouchers, or answer cities’ questions on grants, Benjamin said. Cities may soon have to work with landlords, food banks and within their own limited budgets to help residents get by in the meantime.

“This is affecting people’s lives,” he said. “We’re not just talking about the 800,000 federal workers. Our most economically vulnerable and hardest-working citizens won’t be able to pay rent.”

The National League of Cities program director for community and economic development, Michael Wallace, said rural residents who are using federal loans to purchase homes have not been able to close on their new properties because the Department of Agriculture is closed, creating unexpected hardship.

If the shutdown extends into February, he said, cities are going to have to transfer money from other programs and services to make sure their residents are fed and sheltered.

“The shutdown needlessly complicates what should be standard transactions between different levels of government,” Wallace said. “We don’t have a lot of experience with shutdowns that have lasted this long. Cities are going to have to figure out how to get by until the government resumes.”