Director David Dobkin has revealed how Will Ferrell's iconic character in Wedding Crashers wasn't initially in the script.

The 52-year-old actor, who played funeral crasher Chazz Reinhold in the popular 2005 movie, appears towards the end of the comedy and Dobkin reckons his cameo was a ''rocket boost'' for the movie.

Speaking to Entertainment Weekly, Dobkin said: ''Vince and Owen and I did about three weeks of work on the script before we started shooting, where we'd go through and improv the scenes and create ad-lib stuff and kind of rewrite those scenes.

''This scene wasn't in the movie, and there was a moment when Owen was like, 'Wouldn't it be funny if we crashed funerals?'

''It didn't really fit in that opening montage, and then later when I was looking for an all is lost moment I said, 'Owen, what if you go see Chazz? You mention this guy Chazz and we never see him in the movie.

'''What if you wanted to go see this guy to get some advice and he was crashing funerals? And you think all of this sounds really dark and you're really at your bottom, but when you go with him and you're at the funeral, it feels all wrong and you realise you should be by your friend's side.'

''And so Owen kind [of] went and wrote that scene.''

We need your consent to load this YouTube contentWe use YouTube to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

The movie, which starred Vince Vaughn and Owen Wilson, tells the story of Wilson's character John Beckwith and Vaughn's Jeremy Grey, who crash weddings.

For more movie news, click here