Katie Holmes has been cast for the role of the promiscuous pumpkin on the Halloween special of 'How I Met Your Mother'.

The 'Don't Be Afraid of the Dark' actress - whose last TV role was as a guest star on ABC's 'ELI STONE' in 2008 - is set to play the character who was first mentioned early on in the programme's debut season in 2005.

The pumpkin was talked about as a potential love interest for Ted - who is portrayed by Josh Radnor - after meeting the fictional character at a Halloween party.

Speaking of Katie's casting for the role, creator Craig Thomas explained the 32-year-old beauty was chosen for the role because she is "lovely and talented".

He told New York Magazine: "Katie is a lovely and talented actress, which is why we've saved for her perhaps the most classily named character in our show's history."

He added the role was "literally six seasons in the making."