A parent has failed in his legal action to prevent Al Gore's climate change documentary, An Inconvenient Truth, being shown in schools in England.

But today's High Court ruling stated the film must be distributed with new guidance notes for students and teachers to prevent "promoting partisan political views".

The judge said that Stewart Dimmock, a Kent school governor with two children and a member of a political group called the New Party, had "substantially" won his case because without new guidance to schools from the government, it would have been in breach of the law.

But Kevin Brennan, the children's minister, said the film could continue being shown in schools and that its central arguments were backed by the "vast weight of scientific opinion".

Mr Dimmock accused the government of "brainwashing" children with propaganda by showing the former US vice president's film in the classroom.

Arguing that the film's promotion of partisan political views was "irremediable" and that it contained scientific inaccuracies and "sentimental mush", Mr Dimmock attempted to get the film totally banned from schools in England.

The film is already being distributed to secondary schools in Scotland and Wales.

Mr Justice Burton, sitting at the High Court in London, said the Department for Children, Schools and Families was not under a duty to forbid the film, provided it was accompanied by the guidance.

The judge ruled that schools secretary Ed Balls would not be "promoting partisan political views" if the film was shown "in the context of the discussions facilitated by the guidance note", and he was therefore not under a duty to forbid its presentation in that context.

The department produced new guidance after Mr Dimmock launched his legal action, and flaws in an initial version came to light in court.

Mr Dimmock, a lorry driver from Dover with children aged 11 and 14, said: "I am elated with today's result, but still disappointed that the film is able to be shown in schools.

"If it was not for the case brought by myself, our young people would still be being indoctrinated with this political spin," added Mr Dimmock, who was refused permission to appeal against the judge's decision, but can renew his application in the appeal court itself. His lawyers described today's ruling as "a landmark victory".

Awarding Mr Dimmock two thirds of his estimated legal costs of more than £200,000 against the government, the judge said: "I conclude that the claimant substantially won this case by virtue of my finding that, but for the new guidance note, the film would have been distributed in breach of sections 406 and 407 of the 1996 Education Act."

These sections ban the political indoctrination of schoolchildren and require political views to be presented in a balanced way.

Mr Brennan said: "The judge's ruling is clear that schools can continue to use An Inconvenient Truth as part of their teaching on climate change in accordance with the amended guidance, which is now available on the TeacherNet website." He added: "Climate change is the greatest environmental challenge facing the world today. Schools have a special role to play in helping pupils understand its causes and in exploring if and how we should respond.

"The court's decision recognises that the secretary of state 'understandably formed the view that An Inconvenient Truth was an outstanding film and that schools should be enabled to show it to pupils.' "We have updated the accompanying guidance, as requested by the judge, to make it clearer for teachers as to the stated IPCC [Intergovernmental Panel on Climate Change] position on a number of scientific points raised in the film.

"However, it is important to be clear that the central arguments put forward in An Inconvenient Truth - that climate change is mainly caused by man-made emissions of greenhouse gases and will have serious adverse consequences - are supported by the vast weight of scientific opinion. Nothing in the judge's ruling today detracts from that."

The case arose from a decision in February by the then education secretary Alan Johnson that DVDs of the film would be sent to all secondary schools in England, along with a multimedia CD produced by the Department for Environment, Food and Rural Affairs containing two short climate change films and an animation about the carbon cycle.

The Climate Change Resource Pack has been sent to more than 3,500 schools and is aimed at key stage 3 pupils (11 to 14-year-olds).

Mr Johnson said at the launch that Mr Gore's film sent a "powerful message about the fragility of our planet" and would stimulate children into discussing climate change and global warming.