The U.S. Senate approved a “clean,” unconditional raising of the federal debt limit Wednesday by a 55-43 vote. The House passed the measure Tuesday, and it now goes to the president.

A few minutes earlier, 12 Republican senators joined Democrats on the key cloture vote, 67-31, to end debate and clear the way for passage, although most voted against the measure itself.

Sen. Ted Cruz, R-Texas, threatened a filibuster, but after an hour of debate, Minority Leader Mitch McConnell, R-Ky., and Minority Whip John Cornyn, R-Texas, voted “aye” to end debate when the measure appeared stuck just short of the 60 votes needed, Roll Call reported.

Ten fellow Republicans then followed suit: John Barrasso of Wyoming, Susan Collins of Maine, Bob Corker of Tennessee, Jeff Flake of Arizona, Orrin G. Hatch of Utah, Mike Johanns of Nebraska, Mark S. Kirk of Illinois, John McCain of Arizona, Lisa Murkowski of Alaska and John Thune of South Dakota.

Kirk, a moderate, told reporters his party was sharply divided over strategy behind the scenes, including a dispute between McConnell and Cruz. ”I just want the orderly administration of the U.S. debt,” he said.

The measure removes the threat of a national default, which loomed within a few weeks.