Senate Minority Leader Mitch McConnell, R-Ky., arrives at the Capitol in Washington, Wednesday, Oct. 16, 2013. (AP Photo/J. Scott Applewhite)

WASHINGTON (AP) — Senate leaders announced last-minute agreement Wednesday to avert a threatened Treasury default and reopen the government after a partial, 16-day shutdown. Congress raced to pass the measure by day’s end.

The Dow Jones industrial average soared on the news that the threat of default was fading, flirting with a 200-point gain in morning trading.

“This is a time for reconciliation,” said Senate Majority Leader Harry Reid of the agreement he had forged with the GOP leader, Sen. Mitch McConnell of Kentucky.

McConnell said that with the agreement, Republicans had sealed a deal to have spending in one area of the budget decline for two years in a row, adding, “we’re not going back.”

One prominent tea party lawmaker, Sen. Ted Cruz of Texas, said he would oppose the plan, but not seek to delay its passage.

Related story: Government shutdown: What does it mean for you and your clients?

That was a key concession that signaled a strong possibility that both houses could act by day’s end. That, in turn, would allow President Barack Obama could sign the bill into law ahead of the Thursday deadline that Treasury Secretary Jacob Lew had set for action to raise the $16.7 trillion debt limit.

Officials said the proposal called for the Treasury to have authority to continue borrowing through Feb. 7, and the government would reopen through Jan. 15.

There was no official comment from the White House, although congressional officials said administration aides had been kept fully informed of the negotiations.

While the emerging deal could well meet resistance from conservatives in the Republican-controlled House, the Democratic Leader, Rep. Nancy Pelosi of California, has signaled she will support the plan and her rank and file is expected to vote for it in overwhelming numbers.

That raised the possibility that more Democrats than Republicans would back it, potentially causing additional problems for House Speaker John Boehner as he struggles to manage his tea party-heavy majority.

Boehner and the House Republican leadership met in a different part of the Capitol to plan their next move. A spokesman, Michael Steel, said afterward that no decision had been made “about how or when a potential Senate agreement could be voted on in the House.”

The developments came one day before the deadline Lew had set for Congress to raise the current $16.7 trillion debt limit. Without action by lawmakers, he said, Treasury could not be certain it had the ability to pay bills as they come due.

In addition to raising the debt limit, the proposal would give lawmakers a vote to disapprove the increase. Obama would have the right to veto their opposition, ensuring he would prevail.

House and Senate negotiators would be appointed to seek a deficit-reduction deal. At the last minute, Reid and McConnell jettisoned a plan to give federal agencies increased flexibility in coping with the effects of across-the-board cuts. Officials said that would be a topic for the negotiations expected to begin shortly.

Despite initial Republican demands for the defunding of the health care law known as Obamacare, the pending agreement makes only one modest change in the program. It requires individuals and families seeking subsidies to purchase coverage to verify their incomes before qualifying.

There were some dire warnings from the financial world a day after the Fitch credit rating agency said it was reviewing its AAA rating on U.S. government debt for possible downgrade.

John Chambers, chairman of Standard & Poor’s Sovereign Debt Committee, told “CBS This Morning” on Wednesday that a U.S. government default on its debts would be “much worse than Lehman Brothers,” the investment firm whose 2008 collapse led to the global financial crisis.

Billionaire investor Warren Buffett told CNBC he doesn’t think the federal government will fail to pay its bills, but “if it does happen, it’s a pure act of idiocy.”

Rep. Steve King, R-Iowa, a tea party favorite, said he was not worried about the prospect of a U.S. default.

“We are going to service our debt,” he told CNN. “But I am concerned about all the rhetoric around this ….I’m concerned that it will scare the markets.”

Aides to Reid and McConnell said the two men had resumed talks, including a Tuesday night conversation, and were hopeful about striking an agreement that could pass both houses.

It was expected to mirror a deal the leaders had neared Monday. That agreement was described as extending the debt limit through Feb. 7, immediately reopening the government fully and keeping agencies running until Jan. 15 — leaving lawmakers clashing over the same disputes in the near future.

It also set a mid-December deadline for bipartisan budget negotiators to report on efforts to reach compromise on longer-term issues like spending cuts. And it likely would require the Obama administration to certify that it can verify the income of people who qualify for federal subsidies for medical insurance under the 2010 health care law.

But that emerging Senate pact was put on hold Tuesday, an extraordinary day that highlighted how unruly rank-and-file House Republicans can be, even when the stakes are high. Facing solid Democratic opposition, Boehner tried in vain to write legislation that would satisfy GOP lawmakers, especially conservatives.

Boehner crafted two versions of the bill, but neither made it to a House vote because both faced certain defeat. Working against him was word during the day from the influential group Heritage Action for America that his legislation was not conservative enough — a worrisome threat for many GOP lawmakers whose biggest electoral fears are of primary challenges from the right.

The last of Boehner’s two bills had the same dates as the emerging Senate plan on the debt limit and shutdown.

But it also blocked federal payments for the president, members of Congress and other officials to help pay for their health care coverage. And it prevented the Obama administration from shifting funds among different accounts — as past Treasury secretaries have done — to let the government keep paying bills briefly after the federal debt limit has been reached.

Boehner’s inability to produce a bill that could pass his own chamber likely means he will have to let the House vote on a Senate compromise, even if that means it would pass with strong Democratic and weak GOP support. House Republican leaders have tried to avoid that scenario for fear that it would threaten their leadership, and some Republicans worried openly about that.

“Of all the damage to be done politically here, one of the greatest concerns I have is that somehow John Boehner gets compromised,” said Sen. Lindsey Graham, R-S.C., a former House member and a Boehner supporter.

With the default clock ticking ever louder, it was possible the House might vote first on a plan produced by Senate leaders. For procedural reasons, that could speed the measure’s trip through Congress by removing some parliamentary barriers Senate opponents might erect.

The strains of the confrontation were showing among GOP lawmakers.

“It’s time to reopen the government and ensure we don’t default on our debt,” Rep. Jaime Herrera Beutler, R-Wash., said in a written statement. “I will not vote for poison pills that have no chance of passing the Senate or being signed into law.”

See also:

___

Associated Press writers David Espo, Andrew Taylor, Charles Babington, Stephen Ohlemacher, Henry C. Jackson and Donna Cassata contributed to this report.