Rupert Grint was one of the world’s biggest movie stars before he turned 18, but the actor once contemplated walking away from Harry Potter.

In a candid interview with The Guardian, Grint, now 30, revealed he struggled to separate himself from the character of Ron Weasley over the eight Harry Potter films.

Cast as Harry Potter’s best friend at age 12, Grint admitted he had only auditioned for the role because he was a fan of the J.K. Rowling novels.

But as filming wore on, Grint said shooting became a “massive sacrifice” and he resented having to work for long stretches at a time.

“I definitely remember thinking during one extended break, ‘This whole thing is so all consuming, do I really want to go back? Maybe it’s just not for me,’” he recalled. “I guess I was probably just being a teenager.”

(From left) Emma Watson, Rupert Grint and Daniel Radcliffe in the 2001 film "Harry Potter and the Sorcerer's Stone."

(From left) Emma Watson, Rupert Grint and Daniel Radcliffe in the 2001 film "Harry Potter and the Sorcerer's Stone." (Warner Bros. Pictures)

Despite many child stars falling into partying at a young age, Grint said it wasn’t the case for the Harry Potter cast who “didn’t have the chance to discover drugs” filming in the UK.

But towards the end Grint said he and Ron became “virtually the same person” and adjusting to life after the last Harry Potter movie came out was difficult.

“There’s a lot of me in Ron and moving on was a massive adjustment because it was such a constant part of my life. I don’t want to liken it to coming out of prison because it wasn’t a prison, but it did feel like stepping out of an institution,” he said.

Since appearing in "Harry Potter and the Deathly Hallows: Part 2" in 2011, Grint has shunned blockbuster movies in favour of smaller, indie projects.

Grint previously revealed he considered quitting the film franchise after the fourth movie "Harry Potter and the Goblet of Fire" as he found the fame that came with the role “a little bit scary”.

“I had just finished my GCSEs. I thought ‘do I actually want to keep doing this? It’s a bit of a drag’,” he told The Independent.

“Because obviously it’s a big sacrifice. You take for granted anonymity, just doing normal stuff, just going out. Everything was different and a little bit scary. There were times when I was like ‘I’m done.’”

This article originally appeared on news.com.au.