A high court ruling that councils have no statutory rights to hold prayers at meetings has been strongly criticised by the communities secretary, Eric Pickles.

He said the judgment was "surprising and disappointing" and he believed that under the Localism Act councils ought to be allowed to say prayers.

Local authorities across the country will have to review their practice of holding prayers during formal meetings after the National Secular Society argued successfully against it.

Pickles said: "While welcoming and respecting fellow British citizens who belong to other faiths, we are a Christian country, with an established church governed by the Queen.

"Christianity plays an important part in the culture, heritage and fabric of our nation. Public authorities – be it parliament or a parish council – should have the right to say prayers before meetings if they wish. The right to worship is a fundamental and hard-fought British liberty.

"The Localism Act now gives councils a general power of competence – which allows them to undertake any general action that an individual could do unless it is specifically prohibited by law. Logically, this includes prayers before meetings."

Mr Justice Ouseley ruled in a landmark judgment that Bideford council in Devon had no statutory powers to hold prayers during council meetings. As many as half of UK local councils are believed to hold prayer sessions as part of their formal proceedings. In Bideford's case, the prayers were minuted.

The complaint against the practice was made by a councillor, Clive Bone, who was supported by the National Secular Society. The Christian Institute gave financial support to Bideford town council.

Ouseley said: "A local authority has no powers under section 111 of the Local Government Act 1972 to hold prayers as part of a formal local authority meeting or to summon councillors to such a meeting at which prayers are on the agenda.

"The saying of prayers in a local authority chamber before a formal meeting of such a body is lawful provided councillors are not formally summoned to attend."

Keith Porteous Wood, chief executive of the National Secular Society, welcomed the ruling. "We are delighted that the court has decided to make a ringingly secular decision, which will make the saying of prayers of whatever religion unlawful in local councils. This will mean no one will be disadvantaged or feel uncomfortable in performing their duties as a councillor in meetings."

Bone, the Bideford councillor who launched the action, said he was "delighted" when the Guardian broke the news of the judgment to him.

He said he was horrified when he became a councillor in 2007 to find prayers were being said. "It was outdated, antiquated and a turnoff," he said. He twice championed motions trying to get the practice halted but they were defeated.

Bone argued that the saying of prayers was bad for local democracy. "It sends out a signal that local governments are for particular types of people and not for everyone," he said.

The Christian Institute said: "The practice of saying prayers at Bideford town council meetings is understood to date back to the days of Queen Elizabeth I.

"The council has recently twice voted in support of continuing with the prayers. Individual councillors were free to not take part in the prayers if they wished, and the register of attendance was not taken until after the prayers had finished.

"Nevertheless, a court case was brought by the National Secular Society and a secularist former councillor, Mr Clive Bone, against Bideford town council."

The Christian Institute's spokesman, Simon Calvert, said: "We welcome the finding that the saying of prayers isn't discriminatory, or a breach of equality laws, or human rights laws. But it is extraordinary to rule that councils have no lawful authority to choose, if they so wish, to start their formal meetings with prayers. That is simply wrong.

"The logic of the ruling is that councils would also be going beyond the law if they took a vote and decided to start each formal council meeting with the national anthem."

Tony Inch, a councillor who supported the prayers, said the ruling was a "big shock and a shame". He added: "We seem to be going from one crisis to another. It has implications for councils up and down the country. Where is it going to end? It's eroding the whole basis of Christian life in this country."

The bishop of Exeter, the Right Rev Michael Langrish, said he would encourage councils in his diocese, including Bideford, to continue to say prayers before the statutory business of the meeting began.

He said it was a great pity that "a tiny minority are seeking to ban the majority" of people who were for the saying of prayers.

Speaking on the BBC, he said: "I've got no doubt the agenda of the National Secular Society is inch by inch to drive religion out of the public sphere.

"If they get their way it will have enormous implications for prayers in parliament, Remembrance Day, the jubilee celebrations, even the singing of the national anthem."

"The wider issue has got to be resisted. It strikes right at the heart of our understanding of ourself as a society. No one is compelled to participate in these activities. There is complete freedom. That freedom has to be respected."

The Bideford town clerk Heather Blackburn also expressed "surprise and disappointment" with the ruling.

But she noted that the court "has confirmed that prayers may be said in the council chamber immediately preceding formal business".

Blackburn said: "We are very pleased that the court has decided in favour of Bideford that we had not discriminated against Mr Bone nor infringed his human rights and that the practices adopted by the council did not infringe equality legislation.

"We will be speaking to our legal team to consider our options, including whether to appeal."