A UK Independence party (Ukip) councillor has claimed that Britain's recent storms and floods are "divine retribution for the government's decision to legalise gay marriage.

David Silvester, who defected from the Tories in protest at David Cameron's support for same-sex unions, claimed he had warned the prime minister that the legislation would result in "disasters".

The Henley-on-Thames councillor said that the country had been "beset by storms" since the passage of the new law on gay marriage because Cameron had acted "arrogantly against the Gospel".

In a letter to the Henley Standard he wrote: "The scriptures make it abundantly clear that a Christian nation that abandons its faith and acts contrary to the Gospel (and in naked breach of a coronation oath) will be beset by natural disasters such as storms, disease, pestilence and war.

"I wrote to David Cameron in April 2012 to warn him that disasters would accompany the passage of his same-sex marriage bill.

"But he went ahead despite a 600,000-signature petition by concerned Christians and more than half of his own parliamentary party saying that he should not do so."

Blaming the prime minister for the bad weather, he added: "It is his fault that large swaths of the nation have been afflicted by storms and floods.

"He has arrogantly acted against the Gospel that once made Britain 'great' and the lesson surely to be learned is that no man or men, however powerful, can mess with Almighty God with impunity and get away with it for everything a nation does is weighed on the scaled of divine approval or disapproval."

Ukip said the views expressed by Silvester were "not the party's belief" but defended his right to state his opinions.

A party spokeswoman said: "If the media are expecting Ukip to either condemn or condone someone's personal religious views they will get absolutely no response.

"Whether Jain or Sikh or Buddhist or Sufi or Zoroastrian or Jewish or Muslim or Baptist or Hindu or Catholic or Baha'i or Animist or any other mainstream or minor religion or movement, we are taught as a tolerant society to accept a diversity of ideologies.

"Freedom to individual thought and expression is a central tenet of any open-minded and democratic country. It is quite evident that this is not the party's belief but the councillor's own and he is more than entitled to express independent thought despite whether or not other people may deem it standard or correct.

"That is what makes the United Kingdom such a wonderful, proud, diverse and free country."

Henley's Tory MP John Howell, said: "I thought Mr Silvester's letter was not the sort of thing that he should have written in today's age. He really needs to consider his position."