Image caption The band played Glastonbury two weeks after releasing OK Computer

Thom Yorke says he nearly walked off stage during Radiohead's headline performance at Glastonbury in 1997.

The show, which took place just two weeks after the release of OK Computer, was beset by technical problems.

During the encore, Yorke told the audience "all the speakers have been blowing up and stuff", before thanking them for their patience.

Speaking to BBC 6 Music's Matt Everitt, he revealed he had been on the verge of abandoning the performance.

"At one point I just went over to Ed [O'Brien, guitarist]. I tapped him on the shoulder and said, 'I'm off mate, see you later,'" he told Everitt.

"He turned around and went, 'If you do, you'll probably live the rest of your life regretting it.'

"I went, 'Good point.'"

Media playback is unsupported on your device Media caption Thom Yorke on Radiohead's 1997 Glastonbury performance

Although the band were disappointed by the technical aspects of the show, fans and television viewers barely noticed. Q Magazine once named it the best gig of all time, while Glastonbury organiser Michael Eavis lists it among his top five sets from the festival, calling the band's performance "very, very moving".

Speaking to 6 Music, Yorke admitted he had been against playing the show from the outset.

"I'd burnt myself out," he said. "We had a meeting about what we were going to do for the shows and I was like, 'I can't do Glastonbury'.

"I just needed a break. And in fact I didn't get one for another year and a bit, by which point I was pretty much catatonic."

The full interview will be available on the BBC 6 Music website this Sunday, 11 June. The station will then broadcast the interview at 13:00 BST on Sunday, 25 June.

Image copyright Glastonbury festival Image caption The band's "angry bear" logo was painted onto the field in front of Glastonbury's Pyramid Stage last year, shortly before it was announced they were returning to headline the festival for a third time.

Radiohead return to headline the Pyramid Stage for a third time later this month, on the 20th anniversary of the release of OK Computer.

The band recently announced a limited edition box set of the album, which will contain copies of Yorke's notebook from the era.

The singer said he had thought they were lost until recently, when they turned up in a box in the band's office.

It was "fascinating" going through the pages, he said, "and making friends with whoever this nutter was".

"Oh my God," he laughed, describing "pages where [I thought], 'Seriously, mate, you need to take a break'".

'This is my job'

Among the pages are "30 or 40 different versions of Paranoid Android", the album's ambitious, multi-faceted lead single.

Yorke described how he spent days "endlessly writing out and re-writing" the lyrics.

"I'd only change like five words. It was like a meditation," he said.

"Underlying this, for me, was the sense that I didn't have a real job, but this was work and my notebooks at the time were my point of focus - pulling everything together, whether it was ideas about arrangements, or observations or random drawings.

"It was like, 'I have a job. This is my job'. Which is nuts, but that's how I dealt with the fact… There was a bit of guilt involved."

Image copyright Rex / Shutterstock Image caption Radiohead in 1997, as they prepared to release OK Computer

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.