Nelson Mandela spent 27 years in prison, 18 of them in a small cell on Robben Island, fighting the curse of South African apartheid. Rick Santorum has spent hours in TV studios fighting the curse of millions of poor Americans acquiring healthcare insurance.

The parallels are too obvious to ignore. At least if you are Rick Santorum.

Mandela, he told Fox News within hours of the great man’s death, “was fighting against some great injustice. I would make the argument that we have a great injustice going on right now in this country with an ever-increasing size of government that is taking over and controlling people’s lives — and Obamacare is front and center in that.”

For implicitly comparing his own heroic efforts to block Obamacare to Mandela’s struggle against minority white rule in South Africa, Santorum was granted by Twitter users the award for most tone-deaf response.

Most tone deaf reaction to Nelson Mandela's passing officially goes toooooo....Rick Santorum. http://t.co/aekxK0hKbj — Emily Zanotti (@emzanotti) December 6, 2013

Elsewhere in the Republican firmament, senior figures wrestled with starkly conflicting attitudes towards the deceased.

Several prominent conservatives lavished glowing eulogies on Mandela, among them columnist Charles Krauthammer who likened him to George Washington. The Texas senator and Tea Party favourite Ted Cruz went further, saying in a statement that "Nelson Mandela will live in history as an inspiration for defenders of liberty around the globe.”

Such unadorned flattery was not, however, universally bestowed on Mandela by Republican leaders while he was alive. Take Cruz’s hero, Ronald Reagan, who as president in the 1980s branded the African National Congress a terrorist organisation. Or the Heritage Foundation, a conservative think tank patronised by Cruz, which in the 1990s disputed Mandela’s claim to be a freedom fighter, calling him instead a supporter of terrorism.

The Republican party’s sudden amnesia over its view of Mandela was most pithily captured by Salon, which dubbed the phenomenon the “right-washing” of his legacy.

Strikingly, many of Cruz’s followers on Facebook showed no such loss of collective memory. For them, the Texan senator’s adulatory words were as hard to swallow as they were for liberals mindful of the Republican party’s historic record in this area.

“Stunned to see you support this scumbag, Mr Cruz,” wrote Derek Cranford. “Mandela was a murderer, and a terrorist ... not to mention a communist.” Other commenters said Mandela had been trained by the Russian KGB and made insulting allusions to “South African necklaces”.

If Santorum won the award for tone-deaf response, the Fox News presenter Bill O’Reilly took the medal for most mealy-mouthed praise of the deceased. “He was a great man! But he was a communist! But I would never attack Nelson Mandela!” O’Reilly said on his show The O’Reilly Factor, demonstrating the clarity of thought that has become his trademark.