Sci-fi writer Richard Matheson, author of I Am Legend and Steven Spielberg's debut movie Duel, has died aged 87.

He was probably best known for writing the seminal 1954 novel I Am Legend which was made into a big-budget blockbuster starring Will Smith. He also wrote What Dreams May Come, The Shrinking Man, Hell House and A Stir of Echoes.

He also penned many other scripts for film and TV including the classic 1963 episode of The Twilight Zone, Nightmare at 20,000 Feet in which a young William Shatner is terrified by the presence of a strange creature he spots mid-flight on the wing of a commercial airliner.

Matheson wrote the script for the movie version of his short story Duel, which was directed by a young Steven Spielberg. The film stars Dennis Weaver as a motorist who is terrorised by a mysterious and satanic-looking truck as he makes his way through the desert in Arizona.

Matheson was born in New Jersey and served as an infantry soldier in World War II before publishing his first short story in The Magazine of Fantasy and Science Fiction in 1950.

"My beloved father passed away yesterday at home surrounded by the people and things he loved," Matheson’s daughter, one of four children, wrote on Facebook.

"He was funny, brilliant, loving, generous, kind, creative, and the most wonderful father ever. I miss you and love you forever Pop and I know you are now happy and healthy in a beautiful place full of love and joy you always knew was there."