Jason Segel is set to quit 'How I Met Your Mother'.

The comedy actor is to bow out of the comedy series after he completes filming on its eighth series as his Hollywood career has taken off in recent years with diverse roles in 'Forgetting Sarah Marshall', 'Knocked Up', 'The Muppets' and most recently 'The Five Year Engagement'.

Speaking of his movie career, he told Kurier.at: ''It's great to do some 'Rated R' stuff again, because I've been playing the nice guy for quite a long time now. That's why I'm gonna quit 'How I Met Your Mother' after the eighth season.''

Jason - who is dating 'Oz The Great and Powerful' actress Michelle Williams - has previously said he feels like the show is coming to a natural end, and has stopped drinking alcohol to better concentrate on his career.

He said: ''I f***ing love to drink, but I'm not really capable of moderating. I haven't sworn off it forever. But then, I hope I don't drink again. I'm actually at a big life-turning point in general.

''I've hit my thirties, the TV show that I've been doing for eight years is coming to its natural end, I'm feeling much more like, 'OK, now it's time for phase three.' It's time I think.''

Jason's departure could leave the show's future hanging in the balance as he plays one of the show's central characters, Marshall Eriksen, alongside Neil Patrick Harris, Alyson Hannigan, Josh Radnor and Cobie Smulders.

The eighth season of 'How I Met Your Mother' is set to air in September in the US.