A doctor has won his high court battle against being struck off over the MMR jab controversy. Prof John Walker-Smith appealed against the General Medical Council's determination that he was guilty of serious professional misconduct. He was supported by parents of some of the children with autism and bowel disease treated by him at the Royal Free hospital, north London, until his retirement in 2001. On Wednesday Mr Justice Mitting, sitting at the high court in London, ruled that the GMC decision "cannot stand". He quashed the 2010 finding of professional misconduct and the striking off. Calling for changes in the way GMC fitness to practise panel hearings are conducted , the judge said of the flawed handling of Walker-Smith's case: "It would be a misfortune if this were to happen again."

Walker-Smith said: "I am extremely pleased with the outcome of my appeal … There has been a great burden on me and my family since the allegations were first made in 2004 and throughout the hearing that ran from 2007 to 2010. I am relieved that this matter is now over.." Thanking his supporters, he added: "I will never forget all the support I have received and I am truly grateful for it. I hope now to enjoy my retirement with my family."

In a written ruling, the judge made it clear that the judgment was the end of the case, and the GMC did not intend to appeal.

The judge said the GMC fitness to practise panel's conclusion that Walker-Smith was guilty of serious professional misconduct was flawed in two respects. There had been "inadequate and superficial reasoning and, in a number of instances, a wrong conclusion".

The decision to strike off had been defended at a recent hearing as "just and fair – not wrong" by Joanna Glynn QC, for the GMC.

She said: "In spite of inadequate reasons it is quite clear on overwhelming evidence that the charges are made out."

The judge disagreed and said the misconduct finding and the sanction of erasure – striking off – "are both quashed".

The panel's verdict followed 217 days of deliberation, making it the longest disciplinary case in the GMC's 152-year history. It came 12 years after a 1998 paper in the Lancet suggested a link between the vaccine, bowel disease and autism, resulting in a plunge in the number of children having the vaccination.

Wakefield was the paper's chief author and Walker-Smith the then head of the department of paediatric gastroenterology at the Royal Free, where the research was carried out.

Walker-Smith's clinical role focused on treatment related to sick children, while his academic work included collaborating in research with Wakefield.

"It had to decide what Professor Walker-Smith thought he was doing: if he believed he was undertaking research in the guise of clinical investigation and treatment, he deserved the finding that he had been guilty of serious professional misconduct and the sanction of erasure.

"If not, he did not, unless, perhaps, his actions fell outside the spectrum of that which would have been considered reasonable medical practice by an academic clinician.

"Its failure to address and decide that question is an error which goes to the root of its determination. The panel's decision cannot stand. I therefore quash it."