Beer-swilling, doughnut-lover Homer Simpson has been named the greatest character created for television and film in the past 20 years.

The star character of long-running U.S. cartoon series "The Simpsons" beat schoolboy wizard Harry Potter and vampire slayer Buffy to take top place in the survey for U.S. entertainment magazine Entertainment Weekly.

Simpson's creator Matt Groening said millions of people were able to identify with Homer with his catchphrase "D'oh."

"The Simpsons," broadcast in more than 90 countries, is the longest-running U.S. TV series in prime time, now in its 21st season.

"People can relate to Homer because we're all secretly propelled by desires we can't admit to," Groening was quoted as telling Entertainment Weekly.

"Homer is launching himself head-first into every single impulsive thought that occurs to him. His love of whatever...is a joy to witness."

Harry Potter, created by British author JK Rowling and played by actor Daniel Radcliffe in six films, was described as a "global icon" to take the second place in the magazine's poll.

The star of "Buffy the Vampire Slayer," played by Sarah Michelle Gellar, came third in the list followed by Tony Soprano from HBO drama series "The Sopranos" and comic book villain the Joker played by late Australian actor Heath Ledger in "The Dark Knight."

Rounding out the top 10 were Rachel from "Friends," Edward Scissorhands from the movie of that name, Hannibal Lecter played by British actor Anthony Hopkins, Sarah Jessica Parker's Carrie Bradshaw from "Sex and the City," and cartoon character Spongebob Squarepants.

The list of top 100 characters was released on Monday to mark the 20th anniversary of Entertainment Weekly.

(Writing by Belinda Goldsmith, Editing by Michael Perry)