The S.C. Senate voted late Wednesday to scrap both a Senate and House effort that sought to undo parts of the Affordable Care Act, likely ending the contentious debate about the healthcare law for the year in the General Assembly and handing Republicans in both Houses a stinging defeat.

A procedural ruling by Lt. Gov. Glenn McConnell aided in the defeat of a measure crafted by Sen. Tom Davis, R-Beaufort, who authored an amendment that he believed would gut the Affordable Care Act in South Carolina without running afoul of the courts or the federal government. The Senate also defeated the House bill that would "nullify" the federal healthcare law by a 33-9 vote. Senators on both sides of the aisle said that it was clear that the bill was unconstitutional.

Davis's plan abruptly stalled after two weeks of debate when Sen. Brad Hutto, D-Orangeburg, said Davis's amendment broke Senate rules. McConnell, a Charleston Republican and former member of the Senate, rules on such matters in his position as lieutenant governor. He sided with Hutto and said that Davis's amendment was too different from the original House bill and could not be considered under Senate rules.

At one point in Wednesday's nearly seven-hour debate, Davis asked the Senate to vote to overrule McConnell - a rarity in the Senate. But that effort was shot down as well.

Hutto said that he didn't raise the issue earlier because it allowed Democrats to stall the Republican majority's agenda for two crucial weeks. "We got some sanity back in this chamber," Hutto said of the votes on the ACA.

Davis said in an interview he will continue to try and find ways to undo Obamacare. But he acknowledged those efforts are likely finished for the year.

"I lost, I made the best argument I could," he said.

McConnell, also one of the finalists for the College of Charleston presidency, said in an interview that he ruled strictly on the letter of Senate rules, and didn't let politics or his personal opinion come into play.

"They have to apply to you in good moments and bad moments," McConnell said afterward of the Senate rules. "Precedents are very important."

Davis's plan would have prohibited the state from using its employees to help implement the Affordable Care Act and would have put hurdles on state agencies that wanted to apply for federal grants under the ACA, among other measures.

Many South Carolina hospitals and businesses - often allied with Republicans in the Legislature - opposed the bill.

Reach Jeremy Borden at 708-5837.