Congressional aides predicted Senate Majority Leader Harry Reid and Republican leader Mitch McConnell could seal an agreement by midday

Senate leaders were nearing a deal Tuesday in talks to reopen the U.S. government and prevent a default on American debt that economists say could tip the global economy back into recession.

But an agreement in the Senate would only move the country halfway toward solving a bitter fight between Republicans and President Barack Obama’s Democrats over government spending. Many conservatives in the House of Representatives were standing fast against the plan that would fund the government through Jan. 15 and allow the Treasury to borrow money to pay U.S. bills until February.

With just two days left before the Treasury Department says it will run out of borrowing capacity, congressional aides predicted Senate Majority Leader Harry Reid and Republican leader Mitch McConnell could seal an agreement by midday, easing dual crises that have sapped confidence in the world’s dominant economy and badly shaken support for Republicans. McConnell briefed House Speaker John Boehner on Monday on the status of the Senate talks, and both House and Senate Republican leaders scheduled private meetings with their rank-and-file Tuesday.

With Republican poll numbers plummeting and Americans growing weary of a shutdown entering its third week, Senate Republicans in particular were eager to end the partial government shutdown and avoid an even greater crisis if the government were to default later this month.

The U.S. stock market turned positive Monday on the bullish predictions about the outcome of the Senate negotiations. Stocks in Asia and Europe were tracking upward Tuesday.

The partial government shutdown, which has furloughed 350,000 federal workers, began on Oct. 1 after Congress failed to pass a bill to temporarily funding the government. Separately, if Congress doesn’t approve a measure increasing the amount of money the government is allowed to borrow, the Obama administration says it will not be able to pay America’s bills on time, risking a default that analysts say could prove catastrophic for the economy. Both legislative measures are normally routine.