In a unique experiment, The Guardian published online the full manuscript of its major investigation into the climate science emails stolen from the University of East Anglia, which revealed apparent attempts to cover up flawed data; moves to prevent access to climate data; and to keep research from climate sceptics out of the scientific literature.

As well as including new information about the emails, we allowed web users to annotate the manuscript to help us in our aim of creating the definitive account of the controversy. This was an attempt at a collaborative route to getting at the truth.

We hoped to approach that complete account by harnessing the expertise of people with a special knowledge of, or information about, the emails. We wanted the protagonists on all sides of the debate to be involved, as well as people with expertise about the events and the science being described or more generally about the ethics of science. The only conditions are the comments abide by our community guidelines and add to the total knowledge or understanding of the events.

The annotations - and the real name of the commenter - were added to the manuscript, initially in private. The most insightful comments were then added to a public version of the manuscript. We hoped the process would be a form of peer review.

After the publication of the IPCC report in 2001, the controversy about the hockey stick spread beyond the science community. Political opponents of climate scientists cried foul, and they have stayed on Michael Mann's trail for years.

Republican senator James Inhofe of Oklahoma, who calls global warming a "hoax", repeatedly attacked the Penn State University professor's hockey stick graph. In 2005, Congressman Joe Barton of Texas ordered Mann to provide the House Committee on Energy and Commerce, which he chaired, with extensive details of his working procedures, computer programs and past funding. "There are people who believe that if they bring down Mike Mann, they can bring down the IPCC," Ben Santer of the Lawrence Livermore Laboratory in California told me at the time.

Mann's voluble, self-confident style did not help matters. "The goddam guy is a slick talker and super-confident. He won't listen to anyone else," one of climate science's most senior figures, Wally Broecker of the Lamont-Doherty Earth Observatory at Columbia University in New York, told me. "I don't trust people like that. A lot of the data sets he uses are shitty, you know. They are just not up to what he is trying to do.... If anyone deserves to get hit it is goddam Mann."

The temperature of the debate soared in 2003 with the intervention of Canadian sceptic Steve McIntyre and his economist co-author Ross McKitrick of the University of Guelph. In a paper published in what was becoming the house journal of the sceptics, Energy and Environment, McIntyre and McKitrick widened the attack on the hockey stick by calling into question the statistical methods employed by Mann to amalgamate his different data sets. They even suggested that the hockey stick was entirely an artefact of those methods.

Mann replied in kind. The emails reveal that he heard about the "M&M" paper for the first time the day before it was published. He was angry that the journal had not asked him to review the paper, or at least comment on it, before publication. He put his friends on attack alert. "My suggested response is to dismiss this as a stunt appearing in a 'journal' already known to have defied standard practices of peer-review. It is clear, for example, that nobody we know has been asked to 'review' this so-called paper... the claim is nonsense."

He went on: "Who knows what sleight of hand the authors have pulled. Of course the usual suspects are going to try to peddle this crap. The important thing is to deny that this has any intellectual credibility whatsoever."

In an ironic twist, he appended the anonymous note that had alerted him to the paper, apparently after being distributed among several scientists. It said that, far from being nonsense, the M&M paper reveals what "was known by most people who understand Mann's methodology [that] it can be quite sensitive to the input data in the early centuries." It went on: "There's going to be a lot of noise about this one, and knowing Mann's very thin skin, I am afraid he will react strongly, unless he has learned (as I hope he has) from the past..."

M&M's statistical complaint was that the analysis Mann pioneered, in which different proxy records are merged, involved sorting and aggregating these signals and smoothing the result. It had the effect of flattening the hockey stick shaft. Any graph of real temperatures would have been much less smooth. That was reasonable when all the data used along the graph had been subjected to the same smoothing. But, they complained, if you then added a graph of real temperatures onto the end, to cover the final decades, it gave a misleading impression. Because there was no smoothing in this real data. Their point was that the shaft had been smoothed, but the blade had not. If a few decades of unusually warm temperature had showed up in, say, the 11th century they might have been smoothed away to nothing.

Mann didn't try to hide this in his papers. He put in error bars above and below the main line on his graph, showing how much temperature change the smoothing might have removed. He was among the first paleoclimatologists to do this. What is noticeable is that the error bars are huge. Most of the "blade" of 20th century warming would have fitted within the errors. It wasn't his fault that in future renditions, those very wide error bars sometimes disappeared.

Another criticism was that Mann analysed temperatures in terms of their divergence from the 20th-century mean. Mann agrees this would have highlighted differences from that period and accentuated any hockey stick shape. When M&M repeated Mann's analysis using different statical methods they said they found a big rise in temperatures in the middle ages.

Finally, and perhaps most troublingly, M&M raised questions about the reliability of tree rings as a measure of temperature at all. Tree ring analysts are pretty sure that from the mid-19th century, when we have useable thermometer data, through to the mid-20th century, the width of rings faithfully represents real temperatures. Some detail is lost but the overall measure is good. But since around 1960, a "divergence" problem has emerged. Most tree ring data sets do not reflect the warming seen in thermometer readings (and indeed in nature, as glaciers melt, sea ice disappears, springs come earlier and so on).

Most scientists believe this divergence is a result of some other human-caused factor, but nobody is sure what. And until that is clear, there must be a question mark over the reliability of tree ring data for eras before we have thermometers. In fact this criticism ought to make Mann's hockey stick, which uses a range of different proxies, more reliable than temperature reconstructions based solely on tree rings. And, while the emphasis has mostly been on the probity of Mann's hockey stick, most researchers I have spoken to regard the M&M study as far more deeply flawed. They say it also includes subjective decisions about choice of data sets that seem hard to explain.

There are two take-home questions from this complex saga. Was Mann wrong to do as he did? And did it make any difference to his findings? In the aftermath of the M&M attack on Mann, a number of groups of researchers scrutinised the competing claims.

Hans von Storch of the GKSS Research Centre in Geesthacht, Germany, concluded that M&M were right to say that temperatures should be analysed relative to the 1,000-year mean, not the 20th-century mean. But he also found that even when this was done, it did not have much effect on the result. This didn't stop Mann bad-mouthing von Storch's work in a succession of emails through 2005.

Meanwhile, two people closer to Mann — Caspar Ammann of the National Centre for Atmospheric Research in Boulder, Colorado and Eugene Wahl of Alfred University, New York — claimed that most of the difference between the findings of Mann and M&M had nothing to do with statistical methods. M&M had not "repeated" Mann's study as they claimed. In fact they had done a different study, leaving out some of the sets of tree-ring data that Mann included. In particular, they had excluded tree-ring studies based on ancient bristlecone pines in the south-west of the US. "Basically, the M&M case boiled down to whether selected North American tree rings should have been included, and not that there was a mathematical flaw in Mann's analysis," Ammann told me in 2006.

Interestingly, McKitrick now says he partially agrees. In a newspaper article in the Canadian Financial Post in October 2009, while still complaining that Mann's statistical methods skewed the data, he said of the hockey stick "its shape was determined by suspect bristlecone tree ring data."

Mann has always accepted that his graph was work in progress, and most researchers in the field accept that he is honest if hot-headed. "I'm not slamming what he did overall. It was a great effort, a great step," Jacoby told me in 2005. "But he got into hot water by defending it too hard in places where he shouldn't." But there is a troublingly arbitrary nature about temperature reconstructions when the choices made about which data to include and which not seem often to be based on researchers' hunches. However honest, they are open to the charge of cherry-picking their data. That applies as much to M&M as to Mann.

What counts in science, however, is not a single study. It is whether its finding can be replicated by others. Here Mann has been on a winning streak. Upwards of a dozen studies, using different statistical techniques or different combinations of proxy records, have produced reconstructions broadly similar to the original hockey stick. These reconstructions all have a hockey stick shaft and blade. While the shaft is not always as flat as Mann's version, it is present. Almost all support the main claim in the IPCC summary: that the 1990s was then probably the warmest decade for 1000 years.

A decade on, Mann's original work emerges remarkably unscathed. Briffa's more recent reconstructions are closer to Mann's than those he had in the late 1990s. Folland says: "The Mann work still stands."

McIntyre remains unimpressed. "There is a distinct possibility that researchers have either purposefully or subconsciously selected series with the hockey stick shape," he says.

McKitrick similarly insists that there is a cabal of paleoclimatologists who have their favourite data sets that produce the required shape. In the Financial Post he singled out dodgy data from the US bristlecone pines and another set of tree rings from the remote Yamal peninsula in Siberia. He said they occurred in so many studies that they skewed the lot.

This is not so. The Yamal tree rings were not in the famous hockey sticks of the late 1990s. They were not even published then. According to Jones, of the 12 reconstructions of temperature over the past thousand years used in the last IPCC assessment, only three contained Yamal data.

In 2006, the US National Academy of Sciences published the results of a long inquiry into Mann's findings, triggered by a request from Congress. It upheld most of Mann's findings, albeit with some caveats. "There is sufficient evidence... of past surface temperatures to say with a high level of confidence that the last few decades of the 20th century were warmer than any comparable period in the last 400 years. Less confidence can be placed in proxy-based reconstructions of surface temperatures for AD 900 to 1600, although the available proxy evidence does indicate that many locations were warmer during the past 25 years than during any other 25-year period since 900."

It agreed that there were statistical failings of the kind highlighted by M&M, but like von Storch it found that they had little effect on the overall result. One panel member, Kurt Cuffey of the University of California at Berkeley, reserved his criticism for the way the graph had been used by the IPCC. "I think that sent a very misleading message about how resolved this part of the scientific research was," he said. In retrospect, Mann rather agrees. "Given its place in the IPCC summary with the uncertainties not even shown, we were a target from the beginning," he admitted to me later.

The hockey stick, a pioneering piece of work in progress, became victim of the notoriety it gained from being included in the IPCC summary. And of course its catchy title.

"The label was always a caricature and it became a stick to beat us with," Mann said later. Was it flawed research? Yes. Was it hyped by the IPCC? Yes. Has it been disproved? Despite all the efforts, no. So far, it has survived the ultimate scientific test of repeated replication.

Read the full manuscript of the Guardian's major investigation into the climate science emails stolen from the University of East Anglia and send in your own annotations to create the definitive account of the controversy