A reader at Kensal Rise library, one of the branches set to close. Photograph: Martin Godwin for the Guardian

A landmark legal challenge to a council's decision to close half its libraries, which saw high-profile support from the likes of Alan Bennett, Philip Pullman and Zadie Smith, has been rejected by the high court, opening the way for local authorities across England and Wales to press ahead with similar plans.

A judge dismissed a series of arguments by local opponents that Labour-led Brent council, in north-west London, was breaching the law with its decision.

To the further dismay of campaigners, within hours of the ruling council contractors began boarding over the windows of the six doomed libraries, all of which have been closed with immediate effect, a council spokeswoman said.

Pullman said he was "deeply dismayed" at the decision. He said: "I can hear the popping of champagne corks all over the country as philistine local authorities welcome this news with joy; it will encourage them to be even more destructive of the social good, even more careless of their responsibilities, even more stupid."

National concern at widespread cuts to library budgets, which campaigners say could see a fifth of outlets close, became focused on Brent after the council voted in April to close the libraries, including one, Kensal Rise, opened by Mark Twain in 1900.

With the help of celebrity supporters who also included the Pet Shop Boys and Nick Cave, a pressure group, Brent SOS Libraries, raised funds to apply for a judicial review of the decision, saying the council had not properly assessed certain needs, thus breaching the Equalities Act, and was failing to comply with its duties under the 1964 Public Libraries and Museums Act.

In beginning with an assumption that library closures were needed, Brent had taken "a fundamentally flawed and unlawful approach" in cutting costs, a barrister for the campaign, Helen Mountfield QC, told the high court in July.

The arguments were rejected by Mr Justice Ouseley, hearing the case, who refused a judicial review. The 1964 act did not make libraries "exempt from resource issues", he ruled, while Brent had made sufficiently detailed studies of how users might access other libraries, "albeit at some cost in time and travel".

There was "simply no basis" for another claim, that the closure would disproportionately affect Asian communities, he added.

The council closed all 12 of its libraries on Thursday morning before the ruling. Once it arrived, the six to be spared opened their doors while work began to board over the others. The council spokeswoman said she did not know how many jobs would be lost.

Brent council argues that closing the libraries will allow the remaining six to open longer, with much improved services. Its leader, Ann John, welcomed the ruling, saying it meant "we can push ahead with our exciting plans to improve Brent's library service and offer a 21st-century service for the benefit of all our residents".

Her response was ridiculed by Colin Dexter, the crime author and creator of Inspector Morse. He said: "It's quite extraordinary that you set out upon such a wise and noble aim by closing the libraries." He added: "It seems to be cultural deprivation that we should dismantle this great legacy of the 19th century."

Campaigners said they would go to the court of appeal. "The local campaign will renew its efforts to expose the senselessness of Brent's decision," said the group's solicitor, John Halford, of Bindmans. "It cannot be right to decimate the library service of an inner London borough whose children are desperate to read and study but whose parents cannot afford books, nor the transport costs of regular access to distant libraries. Nor is Brent right to say the threatened libraries are unnecessary to meet local needs. The passion and commitment of the community campaign to keep them open shows that is nonsense."

Margaret Bailey, a Brent resident and campaigner, said the "unequal struggle" with the council would go on: "We believe that there are important points of principle at stake that an appeal court will decide differently. Our campaign will redouble its efforts to expose the senselessness of Brent Council's decision to close half of its libraries."

The former children's laureate Jacqueline Wilson, who spoke at an event to raise money for the campaign earlier this year, said she was desperately disappointed at the news. "I practically lived in the library when I was a little girl," she said, explaining that she "only had about 10 books as a child". "Let us hope an appeal will work," she added. "One has to carry on and fight as well as one can [but] it seems so dreadful."

Brent says its closure plans – other than Kensal Rise, libraries will also close in Barham Park, Cricklewood, Neasden, Preston, and Tokyngton – will save around £1m a year. Of this, £185,000 will be "immediately reinvested" in improving remaining libraries. Opponents say the scheme is deeply flawed as fewer people, especially the young, will visit bigger, more distant libraries.