Tom Hanks has likened recording his final lines in Toy Story 4 to “waving to everybody” he had left behind.

Hanks is reprising his role as Sheriff Woody in the latest instalment of Disney’s beloved series, having first voiced the character in the 1995 original.

The film features returning favourites such as Buzz Lightyear (Tim Allen), Bo Peep (Annie Potts) and Rex (Wallace Shawn), as well as introducing new toys which feature the voices of Keanu Reeves and Tony Hale.

Hanks was asked how he felt while in the recording booth for Woody’s final lines, and he revealed Allen had warned him he had read the scene and he was “still recovering” from it.

Speaking at a press conference in Orlando, Florida, Hanks said he asked director Josh Cooley if he could break with standard practice and turn his back on him to face the wall while recording the scenes, explaining: “I didn’t want to have any self-consciousness for what I knew was going to be the… last few hours I was spending with that movie.”

Hanks, 62, added: “And when it came to pass I felt as though I was on the other side of the river waving to everybody I had left back in the old country. It was pretty profound.”

Tom Hanks is reprising his role as Sheriff Woody in Toy Story 4 (Isabel Infantes/PA)

The actor said the final scene was voiced in the same booth in which he recorded the original Toy Story in.

He said: “There’s so much muscle memory that goes into it. You drive into the lot, through the same gate, you park in the same spot they had for you, then you go through the same doors, get in your car and you drive back through.

“And you think ‘I have recorded the last moment of the current Toy Story’.”

Hanks, fearing he had revealed too much about the film’s ending, then pulled papers from his pocket, explaining they were “talking points” given to the actors by Disney with advice on how to answer questions about the finale.

Laughing, Potts, said: “I think you just said a lot of stuff you weren’t supposed to say.”