President Donald Trump and the Republican-controlled Congress are facing a September of chaos as they race to avert a government shutdown and a default on the national debt, while also facing deadlines on popular programs like children’s health insurance and flood insurance.

Congress is on its August recess and won’t officially get back to work until September 5. When the members return from the monthlong break, they’ll have precious few legislative days to work before they face hard-and-fast deadlines—most notably the September 30 due date to fund the government or face a shutdown like the one that paralyzed the federal government in 2013 for 16 days, causing markets to roil and the economy to slow, and resulting in millions of small businesses and ordinary citizens experiencing disruption and financial loss.

Related: Will The Government Shut Down? Why Trump's Border Wall Threat Is Empty

Passing a new budget always involves fighting and all-nighters for Congress, but President Trump has made the usual battles even more complex with his insistence that he will not sign any funding measure that doesn’t include monies to build a wall along the 1,954-mile border between the United States and Mexico. Last week, Trump told a rally in Phoenix that “if we have to close down the government, we’re building that wall.” But Democrats are unanimous in their opposition to the proposed barrier and many Republicans are as well, making it difficult to chart a way out of the crisis. Earlier this year, Congress and the president fudged their differences by agreeing to pass a mini budget extension that included enhancements for border security and surveillance but did not include building a new wall—a move the White House said was an acceptable alternative in the short run. It’s unclear whether the two sides can come up with a similar kind of compromise next month to avert the kind of shutdown that sent almost 2 million federal workers home or on notice in 2013 and caused massive disruptions to the nation’s economy, including the closure of national parks and a delay in payments to millions of people who work on government contracts.

Congress and the president also must agree to raise the so-called debt ceiling by September 29. That would allow the government to borrow more to pay for past spending. If it can’t get such approval, which historically was routinely granted to presidents, international markets could tumble. In 2011, as the U.S. came perilously close to failing to pass a rise in the debt ceiling, one of the major debt-rating agencies, Standard & Poor's, downgraded U.S. debts, causing the cost of government borrowing to soar. Markets and politicians are agreed that a default on the national debt, which could come days or weeks after a failure to raise the debt limit, could cause a global economic disaster. Last week, the banking giant Barclays released a note to investors warning that “failure to raise the debt ceiling would...likely push the economy into a recession if the situation persisted.” U.S. borrowing costs are already rising in anticipation of a crisis, and America's short-term bond yields are increasing as well. In 2011 and 2013, when America also got close to its “X” date, it cost the United States hundreds of millions of dollars in interest, according to a Federal Reserve study.

Republicans are especially divided on the debt-ceiling question. Treasury Secretary Steve Mnuchin has repeatedly asked Congress for a “clean” raising of the debt ceiling so that the government’s borrowing authority can be extended without any conditions, such as budget cuts. Office of Management and Budget Director Mick Mulvaney has said in the past he’s OK with attaching spending cuts to a debt-ceiling hike. He’s a former member of the conservative Freedom Caucus in the House, which is still vowing to make spending cuts a condition of its support for allowing the government to borrow more. Senate Majority Leader Mitch McConnell has insisted that there will be no delay in raising the debt ceiling, and House Speaker Paul Ryan, who favors a clean hike in the debt ceiling, has expressed similar optimism. But even if Congress avoids the cataclysm that is default, the pain may be felt. During the 2011 standoff, markets fell 20 percent just over the infighting.

There are still other deadlines looming for Congress. The Federal Aviation Administration (FAA), which regulates the nation’s air travel, needs to be reauthorized by the end of the month, but Republicans are divided over the president’s plan to privatize much of the nation’s air traffic control so it resembles a similar system in Canada—perhaps the first time a Republican administration has pointed north for an economic model. The House passed a FAA reauthorization that includes the president’s plan, while a Senate panel passed a short-term one that merely extends the current system for a few months.

As what’s left of Hurricane Harvey pounds Texas, Congress also must face reauthorization of the National Flood Insurance Program, which provides protections for millions of homeowners and businesses as well as a backstop for private insurers. The program is $25 billion in debt after huge layouts for storms such as 2005’s Hurricane Katrina, and some leading Republicans had been pushing a series of reforms to the program that would massively raise deductibles, limit coverage and change the rules on the so-called grandfathering-in of properties designated to be at risk. A number of Republicans—particularly from Gulf of Mexico states, where hurricanes are a constant threat—are in full revolt.

“America, the American economy, Louisiana and the Louisiana economy cannot operate without the National Flood Insurance Program," Senator John Kennedy (R-La.) told Louisiana reporters last week. "Write that down. Take it home to mama. It's the truth."

Another program that faces a deadline is the Children’s Health Insurance Program (CHIP), which covers 9 million low- and middle-income children. Dozens of states will quickly run out of money to finance the popular program, which is normally reauthorized well before its deadline. The ensuing turmoil would wreak havoc on state budgets as well as the lives of children and their families. CHIP funding would have been affected by the various proposed plans to repeal and replace the Affordable Care Act, and with that no longer being a possibility for this year, the two sides may be able to pass something relatively quickly. That would be a rare bright note in an otherwise very dark September on Capitol Hill.