U.S. Senate leaders are trying to craft a last-minute deal to fend off a looming U.S. default and reopen the federal government.

Democratic Senator Harry Reid and Republican Senator Mitch McConnell resumed talks late Tuesday in an effort to strike an agreement that can pass both houses of Congress and be signed by President Barack Obama by Thursday.

The legislation would have to pass the Senate and the House before a deadline Thursday, when the U.S. Treasury Department has said it will reach its borrowing limit and risk default.

Senate aides say the deal under discussion would provide funds to keep the government running through January 15 and and raise the nation's borrowing limit enough to put off the risk of default until early February.

The urgency in the talks is driven by fears financial markets could plunge without a deal.

Billionaire investor Warren Buffett said Wednesday it would be idiocy for the nation's leaders to allow the United States to default on its bills.

In an interview with CNBC television, the Berkshire Hathaway chairman said he does not expect the U.S. will do anything to damage its 237-year reputation of paying its bills on time, but if that does happen, it would be "asinine."

The Fitch credit rating agency placed the U.S. on its "rating watch negative" list Tuesday, a signal that the government's top "AAA" credit rating could be lowered.

In an interview with WABC television in New York Tuesday, President Obama appealed to lawmakers to put politics aside and stop inflicting pain on the American people.

The U.S. government shutdown began its third week Tuesday, with all but essential services closed, along with many national parks, museums, and monuments.