By Richard Cowan and David Lawder
WASHINGTON, March 1 (Reuters) - Congress narrowly averted a partial shutdown of the U.S. domestic security agency late on Friday night, but the forces behind the chaotic episode remain - fractious Republicans and House Speaker John Boehner's lack of control over them.
That may portend more serious trouble ahead as Washington confronts fiscal challenges on a grander scale. In five to seven months, the federal debt ceiling will again be reached, and by October Congress must pass spending bills to keep the government running in the new fiscal year.
Failing to deal effectively with these issues could have much more damaging repercussions - such as a broad government shutdown or a debt default - than a partial shutdown of the Department of Homeland Security (DHS).
What happens between now and then, including the handling of a one-week extension of Homeland Security funding, will be crucial. Some conservatives speak of ousting Boehner, but it is unlikely they can muster enough votes, while others made clear on Friday that they were willing to take big risks to score ideological points.
Brinkmanship like this, reminiscent of 2013's 16-day federal government shutdown, was supposed to be over. Republican Senate Leader Mitch McConnell said there would be no more shutdowns after his party won control of the upper chamber and strengthened its grip on the House last November.
Proclamations about Republicans showing they could govern soothed financial markets, which were rattled by the 2013 shutdown and badly shaken by 2011 budget fights that nearly resulted in an historic government default on its debt.
But Friday's confused late-night scramble renewed old concerns about dysfunctional government. The House rejected a three-week funding extension for the agency when conservatives rebelled because the bill did not block Obama's executive orders on immigration. On a second try late in the evening, House Democrats provided the votes to pass a one-week extension.
The angry conservatives' embarrassing rebuke to Boehner showed they are more fiercely determined than ever to rein in federal spending, shrink the government and challenge Democratic President Barack Obama on multiple fronts.
"It's very possible that come September, you could face this again," said conservative Republican Representative Joe Pitts of Pennsylvania, when asked about debt and budget fights ahead.
For small-government Tea Party activists looking to flex their muscles after November's election victory, any attempt to borrow beyond the $18 trillion national debt will be a red flag. Congress also faces a Sept. 30 deadline for passing spending bills that are certain to add to the $18 trillion debt.