WASHINGTON — A Congress that has struggled all year to legislate returned Monday to face two urgent deadlines that, if not met, could lead to a disastrous default on the federal debt and to automatic spending cuts that would sweep like a scythe through the military, federal health care and other popular programs.

In October or early November, fiscal analysts predict that the Treasury will run out of room to borrow money to keep the government operating, a catastrophe that could damage the stability of the United States economy and force the government to default on its debt.

That is about the same time that back-to-back budget deals would expire and strict spending caps enacted in 2011 would come back into force, automatically cutting military and domestic spending across the board by $125 billion. Lawmakers say they need to act now, before recesses in July and August, to avert a crisis. But so far, a divided Congress has found even usually easy things hard — like passing disaster relief.

“This has been an issue of great concern,” Representative Steny H. Hoyer of Maryland, the majority leader, said in an interview.