John McCain edged out Mike Huckabee to win the South Carolina primary, giving him a solid primary win heading into a key battleground of Florida on Jan. 29.

McCain’s victory is the latest wrinkle in a Republican primary race more muddled than any in recent memory.

The race was the closest of all of the contests on Saturday, and Fox News Channel called the winner at 9:18 p.m. EST, followed by MSNBC at 9:20 p.m. and CNN at 9:22 p.m.

“It took us a while, but what’s eight years among friends,” McCain told supporters, referring to his stinging defeat in 2000 to George W. Bush.

McCain stressed his ability to take on Washington spending and his support of continued U.S. involvement in the war in Iraq, while Huckabee emphasized moral issues and economic populism.

“We’ve got a lot of miles ahead of us,” Huckabee said. “It’s a long process and a long path.”

McCain’s win was perhaps most stinging for Huckabee, who had banked on a victory in the race given the state’s heavy concentration of evangelicals.

Meanwhile, further evidence that the ugliness is most extreme on the Democratic side this time. Here’s an anti-Obama “robocall” that ran in Nevada.