* Senate plan would extend borrowing authority to Feb. 7
* Treasury says government hits debt limit on Thursday
* Two plans by House Republicans collapse amid opposition
* Fitch Ratings warns it could cut U.S. credit rating
By Richard Cowan and Amanda Becker
WASHINGTON, Oct 15 (Reuters) - With the United States just a day away from exhausting its ability to borrow money, U.S. Senate leaders were still discussing a deal late on Tuesday aimed at raising the debt limit and reopening federal agencies that have been closed for two weeks.
Senate aides said a deal was close but details remained to be worked out, and earlier hopes that a deal could be announced late on Tuesday were not met.
The U.S. Treasury says the government will bump up against its $16.7 trillion borrowing limit on Thursday, leaving little room for error and raising the risk the government will fail to pay its bills and creditors.
Even once a deal is reached, it must clear the full Senate and possible procedural snags in that chamber on Wednesday before moving to the fractious House of Representatives that was unable to produce its own deal on Tuesday.
Amid the chaos, Fitch Ratings warned it could cut the sovereign credit rating of the United States from AAA, citing the political brinkmanship over raising the federal debt ceiling.
Senate Majority Leader Harry Reid and Republican leader Senator Mitch McConnell were discussing ways of avoiding procedural hurdles that could slow down the measure, Democratic Senator Heidi Heitkamp told CNN late Wednesday.
"This is now back on track," she said, its fate dependent on "whether the House and Senate play well together."
As previously outlined, the Senate deal under discussion would extend U.S. borrowing authority until Feb. 7, although the Treasury Department would have tools to temporarily extend its borrowing capacity beyond that date if Congress failed to act early next year.
The bill also would fund government agencies until Jan. 15, ending a partial government shutdown that began with the new fiscal year on Oct. 1.
It was another roller-coaster day of fiscal negotiations in Congress that saw two separate legislative efforts by the House die before they could even be debated by the full chamber. The measures were buried after it became apparent that too many Republicans were rebelling against their leaders' bills.
Aides said Reid and McConnell were looking at two possible ways of speeding the legislation through the Senate, which often can get bogged down for several days with procedural hurdles.
If such delays were allowed, they could throw the U.S. into default by making passage of a bill impossible by Thursday.
Under one scenario, all 100 senators would agree to let Democrats schedule quick votes to pass the bill. That would mean that Tea Party faction firebrands, such as Republican Senator Ted Cruz, would give up their rights to delay a vote.
Cruz has not publicly announced his intentions but some Senate aides think that the Texas freshman with presidential aspirations has been sending positive signals in recent days.
Cruz and fellow Tea Party activists late last month delayed passage of a government funding bill as they demanded major changes to Obama's landmark healthcare law.
The deadlock led to federal agency shutdowns as Obama and his fellow Democrats stood firm against changing the law.
The other scenario would have the House send a formal "message" to the Senate to pave the way for quick Senate action, according to a Senate aide who asked not to be identified.
Again, it was not clear whether House Republicans would go along with that option.
BOEHNER'S TOUGH DECISION
Either way, House Speaker John Boehner will have to decide whether to allow passage of a bill that many of his fellow Republicans might oppose, a decision that could impact the top Republican's political future.
House Republicans twice tried to come up with a new compromise but failed to satisfy Obama, Senate Democrats or Tea Party conservatives.
The first House Republican attempt was shot down in a closed-door meeting that had begun with members singing the hymn "Amazing Grace."
The second plan was scuttled hours before it was expected to hit the House floor for a vote after the influential Heritage Action for America, a conservative group, urged a "no" vote because it did not do enough to stop Obama's healthcare law.
If Congress fails to reach a deal by Thursday, checks would likely go out on time for a short while for everyone from bondholders to workers who are owed unemployment benefits. But analysts warn that a default on government obligations could quickly follow, potentially causing the U.S. financial sector to freeze up and threatening the global economy.
The U.S. Treasury Department seized on Fitch's downgrade threat to press Congress. "The announcement reflects the urgency with which Congress should act to remove the threat of default hanging over the economy," a Treasury spokesperson said.
Numerous polls show Republicans have taken a hit in opinion polls since the standoff began and the government shutdown. A Washington Post/ABC News poll released on Monday found that 74 percent of Americans disapprove of the way congressional Republicans have handled the standoff, compared with a 53 percent disapproval rating for Obama.