Al Gore's film was sent to schools in England, Wales and Scotland

Mr Justice Burton said the government could still send the film to schools - if accompanied by guidance giving the other side of the argument.

He was ruling on an attempt by a Kent school governor to ban the film from secondary schools.

The Oscar-winning film was made by former US Vice-President Al Gore.

Mr Justice Burton said he had no complaint about Gore's central thesis that climate change was happening and was being driven by emissions from humans. However, the judge said nine statements in the film were not supported by mainstream scientific consensus.

In his final verdict, the judge said the film could be shown as long as updated guidelines were followed.

These say teachers should point out controversial or disputed sections.

Without the guidance, updated after the case was launched, the government would have been breaking the law, the judge said.

The government has sent the film to all secondary schools in England, and the administrations in Wales and Scotland have done the same.

The film won two Oscars.

'Landmark victory'

Mr Justice Burton told London's High Court that distributing the film without the guidance to counter its "one-sided" views would breach education laws.

The Department for Children, Schools and Families was not under a duty to forbid the film, provided it was accompanied by the guidance, he 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", he said.

The nine errors alleged by the judge included:

Mr Gore's assertion that a sea-level rise of up to 20 feet would be caused by melting of ice in either West Antarctica or Greenland "in the near future". The judge said this was "distinctly alarmist" and it was common ground that if Greenland's ice melted it would release this amount of water - "but only after, and over, millennia".

Mr Gore's assertion that the disappearance of snow on Mount Kilimanjaro in East Africa was expressly attributable to global warming - the court heard the scientific consensus was that it cannot be established the snow recession is mainly attributable to human-induced climate change.

Mr Gore's reference to a new scientific study showing that, for the first time, polar bears had actually drowned "swimming long distances - up to 60 miles - to find the ice". The judge said: "The only scientific study that either side before me can find is one which indicates that four polar bears have recently been found drowned because of a storm."

The case was brought by school governor Stewart Dimmock, from Dover, a father of two, who is a member of the New Party.

His lawyers described the ruling as a "landmark victory".

Mr Dimmock said: "I am elated with today's result, but still disappointed that the film is able to be shown in schools.

Mount Kilimanjaro has had its snow reduce in recent years

"If it was not for the case brought by myself, our young people would still be being indoctrinated with this political spin."

The judge awarded Mr Dimmock two-thirds of his estimated legal costs of more than £200,000, against the government.

BBC environment analyst Roger Harrabin said the ruling would be "embarrassing for Mr Gore" but would not affect the government, which said it was happy that the judge did not dismiss the film's mainstream argument.

But, he added, this controversy could encourage the public to think there was scientific doubt about the facts of climate change.

Children's Minister Kevin Brennan had earlier said: "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 comments today detract from that."

He had previously said the updated guidance made "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".

Notes to teachers on the guidance, on the government's Teachernet website, say: "An Inconvenient Truth is a film that has had a big impact. Its aim is to make the science and the arguments about global warming and climate change and its effects accessible to all audiences. It also presents a powerful case in favour of one particular type of political response to climate change.

"However, in parts of the film, Gore presents evidence and arguments which do not accord with mainstream scientific opinion. This guidance points out, on a scene by scene basis, the areas where further input will be required from teaching staff. This guidance is designed to help teaching staff encourage their pupils to assess the validity and credibility of different information sources and explore different points of view so as to form their own opinions."

Shadow Environment Secretary Peter Ainsworth said: "This is further evidence of the Government being all over the place on climate change.

"Instead of grabbing the first thing they could think of and then shooting it out to schools, the Government should put together a proper, up to-date, education pack about climate change - based on current evidence."