By Richard Cowan and Thomas Ferraro

WASHINGTON (Reuters) - Efforts by lawmakers to stop a U.S. debt default were in disarray on Tuesday with just over a day before the government's authority to borrow money lapses, risking the Treasury's ability to pay bills and creditors.

Chaotic negotiations to end the U.S. fiscal impasse failed to produce a deal, and left Congress and President Barack Obama desperately searching for a way to reopen the government and raise the country's debt limit ahead of a Thursday deadline.

Both measures require approval by the U.S. Senate and the House of Representatives. In the Democrat-led Senate, leaders of both parties resumed negotiations, but the Republican majority in the House appeared to be even more divided than usual.

In a span of a few hours, two plans floated by Republicans in the fractious House collapsed for a lack of support and Senate negotiations that were close to an agreement were suspended to await a solution from the House.

But on Tuesday evening, spokesmen for Senate Majority Leader Harry Reid and Senate Republican leader Mitch McConnell said their talks were back on. A spokesman for Reid said the two leaders "are optimistic that an agreement is within reach" but offered no timetable.

The uncertainty led Fitch Ratings to warn it could cut the sovereign credit rating of the United States from AAA, citing the political brinkmanship over raising the federal debt ceiling.

Fitch's action emphasized how close to an economically damaging default Washington has come, and sent U.S. stock futures lower.

House Republicans twice tried to come up with a new compromise but failed to satisfy Obama, Senate Democrats or Tea Party conservatives who are determined to win changes to the president's signature healthcare law before they will agree to concessions on the budget.

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.

Heritage said it would consider the plan a "key vote" in evaluating whether to back candidates in next year's congressional elections. Shortly after that warning, a committee hearing scheduled to set rules for the debate was postponed and the plan put in limbo.

This second plan from House Republicans dropped a provision to delay a tax on medical devices that would be used to pay for Obama's healthcare plan. Obama had objected to that proposal.

But the second plan, which would extend the federal debt limit until February 7 like the Senate, would only provide government funding until December 15, drawing fire from the White House and Democrats for opening the door to another potential government shutdown just before Christmas.

The Senate plan would keep the government open longer, until January 15.

The chaos raised questions about what the House will ultimately be able to pass and stoked 11th-hour uncertainty.

"We're going to continue to work with our members on both sides of the aisle to try to make sure that there is no issue of default, and to get our government reopened," House Speaker John Boehner told reporters after the closed-door meeting.

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.

After the Fitch announcement, S&P 500 futures fell 9.6 points while Dow Jones industrial average futures sank 60 points and Nasdaq 100 futures fell 7.5 points.

FITS AND STARTS

In the coming hours, much of the focus will be on Boehner and whether he agrees to the demands of the more conservative wing of his party.

Story continues