Channel 4 misrepresented some of the world's leading climate scientists in a controversial documentary that claimed global warming was a conspiracy and a fraud, the UK's media regulator will rule next week.

In a long-awaited judgment following a 15-month inquiry, Ofcom is expected to censure the network over its treatment of some scientists in the programme, The Great Global Warming Swindle, which sparked outcry from environmentalists.

Complaints about privacy and fairness from the government's former chief scientist, Sir David King, and the Nobel peace prize-winning Intergovernmental Panel on Climate Change will be upheld on almost all counts, the Guardian has learned.

But it is understood that Channel 4 will still claim victory because the ultimate verdict on a separate complaint about accuracy, which contained 131 specific points and ran to 270 pages, will find that it did not breach the regulator's broadcasting code and did not materially mislead viewers.

The detail of the ruling is expected to criticise Channel 4 over some aspects of the controversial programme, made by the director Martin Durkin, but executives will argue that the key test of whether or not it was right to broadcast the programme has been passed.

One source said both sides would be able to claim victory after a bitter dispute that has raged in newspapers and online since the programme, billed as "a definitive response" to Al Gore's An Inconvenient Truth, was first broadcast in March last year.

The programme was criticised by scientists, who claimed it fundamentally misrepresented the evidence about global warming, that it rehashed discredited old arguments and manipulated data and charts to make its case.

The IPCC, King and other scientists including Dr Carl Wunsch, a climate expert at the Massachusetts Institute of Technology, complained to the regulator over the way they were represented. Ofcom is expected to find in favour of King's complaint and three out of five of the IPCC's. One is expected to be thrown out and the fifth will be partially upheld.

In its judgment on King's complaint, Ofcom will say: "Channel 4 unfairly attributed to the former chief scientist, David King, comments he had not made and criticised him for them and also failed to provide him an opportunity to reply".

In the programme, the concluding voiceover from the climate change sceptic Fred Singer claimed "the chief scientist of the UK" was "telling people that by the end of the century, the only habitable place on Earth will be the Antarctic and humanity may survive thanks to some breeding couples who moved to the Antarctic ... it would be hilarious if it weren't so sad".

King has never made such a statement and it is believed Singer confused his views with those of the contrarian scientist James Lovelock. King did once say that "the last time the Earth had this much C02, the only place habitable was the Antarctic".

Addressing the IPCC's complaint over 21 pages, Ofcom will rule that the programme "made significant allegations ... questioning its credibility and failed to offer it timely and appropriate opportunity to respond".

But Channel 4 has argued that the organisation had refused to cooperate with the programme-makers.

After the broadcast, Wunsch said the programme was "masquerading as a science documentary when it should be regarded as a political polemic" and was "as close to pure propaganda as anything since world war two".

He claimed he had been duped into appearing and his comments had been misleadingly edited.

The Ofcom ruling is expected to find that Wunsch was misled about the tone and content of the programme, but that his views were accurately represented within it. Durkin, who had previously made other controversial documentaries, including Against Nature and the Rise and Fall of GM, vigorously defended the broadcast.

"The death of this theory will be painful and ugly. But it will die. Because it is wrong, wrong, wrong," he wrote.

Channel 4 justified the broadcast by saying it was a useful contribution to a timely debate, arguing that it had a tradition for iconoclastic programming and had also aired programmes supporting the case for man-made climate change.

The producers claimed that after it was broadcast, Channel 4 received a record number of phone calls that were six to one in favour of the arguments made. The film was subsequently sold to 21 other countries. A global DVD release went ahead despite protests from scientists.

A Channel 4 spokesman said: "We wouldn't comment on any Ofcom ruling in advance of its publication." Ofcom declined to comment.