Image copyright Twitter

Amidst the news of a mass shooting in California, a lively debate erupted on Twitter over the power and utility of offering "prayers" in the wake of such an event.

It's political boilerplate to offer "thoughts and prayers" to the victims of violence, and the majority of Republican presidential candidates took this approach after a shooting in California left 14 people dead and more injured.

"Our prayers are with the victims, their families, and the first responders in San Bernardino who willingly go into harm's way to save others," wrote Ted Cruz.

Democrats Hillary Clinton and Bernie Sanders went a different route, and made statements about gun policy. "I refuse to accept this as normal. We must take action to stop gun violence now," wrote Clinton.

Image copyright Twitter

Before long, the difference in approach was picked up on social media - and rapidly politicised. What followed was a raging debate, in which Democrat-leaning voices criticised the appropriateness of offering prayers in the face of what many saw as a consequence of "political choice" - the decision not to pass gun reform laws in the US. At the most extreme end, it was dubbed "prayer-shaming".

"Your "thoughts" should be about steps to take to stop this carnage. Your "prayers" should be for forgiveness if you do nothing - again," tweeted Senator Chris Murphy, a Democrat. He represents the state of Connecticut, where 28 people, mostly children, were killed in the Sandy Hook shootings.

A plan for gun reform was put forth by President Barack Obama after that tragedy, but failed to pass Congress.

ThinkProgress reporter Igor Volsky retweeted politicians who offered "thoughts and prayers," adding to each tweet the campaign contributions they received from the National Rifle Association.

Image copyright Twitter

But there was a backlash, from those who said the attack on prayers were partisan and mean-spirited. "The American Left on display today: The hashtag #BringBackOurGirls works. Tweeting 'Prayers offered' should be shamed and ridiculed," wrote conservative pundit Erick Erickson.

The Federalists' Sean Davis retweeted messages from President Obama offering thoughts and prayers after a shooting at the Navy Yard, in Washington DC, as well as the MH17 plane crash and the Charlie Hebdo shooting in Paris.

Image copyright Twitter

As the debate wore on, some tried to find room for both messages.

"To be clear: Offering prayers is not the problem. They can be a balm and a sign of good will. But politicians' actions are relevant too," wrote the science fiction writer John Scalzi.

"Guys. Don't mock the sincere offering of prayers. Mock legislative inaction or hypocrisy. But offering a prayer is not offering NOTHING," wrote Ana Marie Cox, a left-leaning pundit who is public about her faith. She hosted a largely respectful debate about prayer on her Twitter feed for most of the night, which ended with an "official call for cute animal pix".

Image copyright Twitter

"It's nice to know we can cross party lines for belly rubs," she wrote.

Blog by Kate Dailey

Next story: 'Kylie Jenner, wow, being in a wheelchair is so fun and fashionable!'

Image copyright Twitter

Reality TV star Kylie Jenner has angered some disabled people, by posing in a gold wheelchair for a fashion shoot. READ MORE

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.