A federal government shutdown would cost state and local governments millions of dollars a day, further straining already-stretched budgets and threatening an already-weak economic recovery.

If the House and Senate can’t agree on a continuing resolution to fund the federal government before the Oct. 1 end of the fiscal year, national parks will close, payments to federal contractors will be delayed, and hundreds of thousands — perhaps millions — of federal workers will be forced to take unpaid furloughs.

State governments are bracing for a shutdown that would impact several layers of economic activity. A government shutdown would delay federal grants that support state-run programs and pay the salaries of tens of thousands of state employees. Federal employees not being paid during a shutdown would mean lost tax revenue. And both a loss of grant funds and lower tax revenue would mean less economic activity trickling down to businesses, large and small, according to state budget officers making plans before the fiscal year ends.

“You’ve always got to take [the threat of a shutdown] seriously and make preparations for it,” Ric Brown, Virginia’s secretary of finance, said in an interview.

In a memo to state agencies sent Tuesday, Martin Kent, chief of staff to Virginia Gov. Bob McDonnell (R), said state agencies should avoid expenses related to federal programs or grants after Oct. 4, according to the Richmond Times-Dispatch.

In Maryland, Department of Budget and Management Secretary T. Eloise Foster said in an e-mail that a shutdown “will directly impact the lives of thousands of Maryland families who work for the federal government.”

Every day that the federal government is shut down, Foster said, would cost the state $5 million in lost revenue, including about $1 million in lost sales-tax dollars. Maryland businesses, she said, would lose about $15 million for every day the government’s doors are shuttered.

Both Maryland and Virginia, where a disproportionate number of residents work for the federal government, will be able to keep federally funded employees on state payrolls, at least temporarily. Kent wrote to state agencies that Virginia state employees partially paid for by the federal government would remain on the payroll at least until Oct. 4, while Foster said a shutdown of just a few days wouldn’t result in furloughs.

If the shutdown lasts longer than just a few days, however, at least 11,000 Maryland employees could face unpaid time off. “A prolonged shutdown could lead to significantly lower State revenues resulting in the need to reduce funding for a variety of programs,” she wrote.

“I don’t think the largest impact for Virginia is on the federal funds flow-through side,” Brown said. “The biggest impact on us is probably the economic impact on the federal workforce.”

Connecticut’s secretary of the Office of Policy and Management, Benjamin Barnes, said in a letter to state agency heads that a shutdown could have “a serious negative impact on state revenues,” according to the Associated Press. In the event of a shutdown, state employees usually paid with federal dollars would probably have to be paid out of state accounts, Barnes said.

Brown said a shutdown this year could be more harmful than the last time the federal government couldn’t reach a budget deal, back in 1995. The previous year, he pointed out, Congress had passed appropriations measures that funded some of the federal grants and state jobs, meaning that money had already been earmarked for the states. So far this year, Congress has not passed any appropriations bills for 2014, meaning that no money has been allocated — and that the damage could be much worse.

“You don’t have appropriations bills that are passed this time, unlike the last federal shutdown, [when] there were a few bills that had passed. The shutdown would probably be a little more extensive this time around,” he said. “This probably means it’s a little more complicated for us.”

But if a shutdown lasts for only a few days, most states will avoid the pain — thanks to another federal decision that cost the states big bucks. After the federal budget sequester slashed funding that would have been allocated to the states, several states set aside millions to make up for the lost cash. Maryland, Foster said, has set $100 million aside in anticipation of lost revenues thanks to the sequester.

The state has already spent about $9 million to fill gaps left by sequestration for programs such as Head Start and home-delivered meals to senior citizens.