Ewan McGregor thought he was too "urban grunge" to appear in 'Star Wars'.

The 51-year-old star played Obi-Wan Kenobi in the prequel trilogy of the sci-fi franchise but revealed that he nearly turned down the part as he wanted more indie roles following his success in 'Trainspotting'.

Ewan told the 'Smartless' podcast: "I really had to think about it. Because it came right after that 'Trainspotting' period, and by that time I was so full of myself."

The actor quipped: "I was like, 'I am Danny Boyle's actor. I am f****** urban grunge. I am the Oasis of the British movie industry', and then when 'Star Wars' came around, I felt, 'I don't know if I want to do this. This isn't me.'

"I was so into being this sort of antihero. I felt like an indie British actor. I felt like that defined me."

McGregor revealed that it was a childhood love of the franchise that ultimately persuaded him to take the part.

The 'Moulin Rouge!' star recalled: "In the end, it just got closer and closer. By that time, I was just so attached to the idea of it from where I was a kid. To get a chance to be that character and play the younger Alec Guinness was pretty awesome.

"I was almost grateful to be involved in something that big and to be part of the legend of it, because I loved it. When I was a kid, I loved those films. I was six or seven when the first one came out. It's in me somehow."

Ewan, who reprised his role as the Jedi for the Disney+ spin-off series 'Obi-Wan Kenobi', says that making the sci-fi films was hugely different from featuring in indie projects.

He said: "It's a different process. Those prequels, it was very much the challenge of trying to be believable in front of a blue curtain for four months."