President Donald Trump has threatened a partial government shutdown over his demand for more funding to build a border wall, but such a move could have economic as well as political casualties, economists say.

With no resolution in sight for lawmakers, and a president at loggerheads with his own party’s leadership, economists worry that political dysfunction could undercut investor and consumer confidence, hobbling the economy’s chances for continued growth in 2019.

“Democrats don’t have much incentive at the moment to make a deal. At the same time, it looks like Trump is digging in,” said Andrew Hunter, senior U.S. economist at Capital Economics. “All of this just doesn’t generally bode well for next year.”

A new Capital Economics report went so far as to label a potential shutdown the biggest risk to the national economy in 2019. Its economists noted trade tensions with China and Federal Reserve policymaking, but flagged the partisan gridlock that could bring Washington grinding to a halt as the biggest threat to economic growth.

Although a shutdown would affect only about a quarter of the government and hit nonessential workers and functions, economists are framing it as a preview of how larger battles — such as the March deadline to raise the debt ceiling — could play out once Democrats retake control of the House.

“If things continue as they are, it’s easy to see that becoming a hotly contested issue,” Hunter told NBC News. “There is a risk just given the fractured nature of the political environment at the moment that the shutdown could last for weeks or months rather than days."

Other experts were more sanguine. David Wessel, director of the Hutchins Center on Fiscal and Monetary Policy and senior fellow of economic studies at the Brookings Institution, said that he expected any shutdown to be short-lived.

“Both parties see shutdowns as a political liability,” he said. “I think it’s likely to be more of an inconvenience and an embarrassment than a catastrophe.”

Wessel added, though, that a prolonged shutdown would be another story. “If this goes on for more than two or three weeks, it becomes more of a problem,” he said. “If the government appears incapable of handling a situation, then I think it does shake people’s confidence."

The biggest variable is the duration, economists say. The 16-day shutdown in 2013 over the debt ceiling cost the U.S. $24 billion, according to Standard & Poor’s. The concern is that a crisis of confidence could spook investors and rattle an already-shaky market, which in turn could cause the engine of consumer spending that powers much of the economy to seize.

“If we come back from the holidays and the government is still shut down, it will start to wear on people and the damage will start to mount,” said Mark Zandi, chief economist at Moody’s Analytics.

“The markets are obviously already very fragile,” Zandi said, and a shutdown — particularly if it were to last long enough to interrupt services crucial to homebuying, tourism or commerce — could throw cold water on investor confidence. And with research showing that even Americans who don’t own stocks have their outlook influenced by market movement, the chill could be contagious.

“There’s a potent wealth effect. The down stock market depresses everybody even if you don’t own stocks, and it makes CEOs very cautious,” Zandi said.

A lengthy government shutdown also could slow down the increased government spending that was expected to provide economic stimulus as the effects of last year’s tax cuts fade.

“Government agencies in the Trump administration are already pretty dysfunctional,” Zandi said. “And if you have a government shutdown, that’s just going to exacerbate those.”