A legal challenge against controversial plans to carry out a mass cull of badgers in Wales in an attempt to control bovine TB was rejected by a judge today.

The Badger Trust, supported by the rock star Brian May, had aimed to overturn an order by the Welsh assembly government for the cull to take place but a judge dismissed the charity's arguments.

May said he was disappointed but warned the battle would continue.

"This is a disappointment, of course," the Queen guitarist said. "But not just for thousands of innocent badgers. The irony is that it is ultimately a tragedy for farmers, too – the very farmers who have been pushing for badgers to be culled.

"The decision to cull cannot lead to any significant long-term gain in the fight against bovine TB, even with the complete extermination of our native badgers.

"I believe all this will be seen in a few years time for what it is … a tragic wrong turn which did nothing to solve the problem of TB in cattle.

"For the sake of all involved, we will not be giving up the fight for what is right. We are taking advice on appealing at a higher level."

The Welsh rural affairs minister, Elin Jones, welcomed the court's decision. "Bovine TB is one of the biggest problems facing cattle farmers across Wales, and we have to tackle all sources of the disease. We are dealing with an epidemic that has serious consequences for us all and we must stamp it out.

"Over the past three years, with advice from experts, we have put in place a comprehensive programme to eradicate TB across Wales. This includes more testing of cattle, identifying and getting rid of the disease in cattle at an earlier stage and improving on farm practices.

"We need to read and digest this verdict. In the meantime, we will continue with the preparations in the pilot area."

The Badger Trust turned to the courts to try to force a judicial review of the Welsh assembly government's TB eradication order, which allows a cull in parts of west Wales as early as next month.

A two-day hearing was held before Justice Lloyd Jones at the Swansea civil justice centre last month. Sitting at the Cardiff civil justice centre today, Jones rejected the trust's claim that the way the decision had been made was unlawful.

The Badger Trust had argued badgers should only be culled if:

• such culling would "eliminate or substantially reduce" the incidence of TB in cattle;

• such culling is "necessary" to achieve the elimination or substantial reduction in question;

• there are "no other satisfactory alternative" ways of achieving that elimination/substantial reduction;

• the harm involved has been properly balanced against (and justifies) the potential benefit;

• and the cull complies with the international Bern convention, which promotes the protection and conservation of wild fauna such as badgers.