Image copyright Getty Images Image caption Goldman died on Friday at his New York home

William Goldman, screenwriter of Butch Cassidy and the Sundance Kid and All the President's Men, has died aged 87.

Goldman, who received Oscars for both of those films, also wrote Marathon Man, Magic and The Princess Bride, which he adapted from his own novels.

His memoir Adventures in the Screen Trade is famous for his memorable declaration that "nobody knows anything" about the movie business.

He was also a noted "script doctor" who worked uncredited on many features.

Born in Highland Park, Illinois in 1931, Goldman started out as a novelist before breaking into movies with 1965 spy caper Masquerade.

He followed that with The Moving Target, also known as Harper, in which Paul Newman played a laconic private eye.

Image copyright 20th Century Fox/Getty Images Image caption Robert Redford and Paul Newman played the title characters in Butch Cassidy and the Sundance Kid

Newman would go on to star in Butch Cassidy with Robert Redford, who himself went on to star with Dustin Hoffman in All the President's Men.

Goldman was much praised for his dramatisation of the Washington Post's investigations into the Watergate affair.

Disagreements during its production, however, would later see him express a wish he had never taken on the project.

"If you were to ask me 'What would you change if you had your movie life to live over?' I'd tell you that I'd have written exactly the screenplays I've written," he wrote in Adventures in the Screen Trade.

"Only I wouldn't have come near All the President's Men."

Giants, swordsmen and pirates

Goldman's other films include World War II epic A Bridge Too Far, the Stephen King adaptation Misery and the Clint Eastwood thriller Absolute Power.

For many, though, he will be best remembered for The Princess Bride, a part-parodic fairy tale set in a world of giants, pirates and "rodents of unusual size".

Image copyright 20th Century Fox/Kobal/Shutterstock Image caption Cary Elwes and Robin Wright played 'Westley' and 'Buttercup' in The Princess Bride

Thirty years on, actor Mandy Patinkin is still regularly asked to recite the "My name is Inigo Montoya" speech Goldman wrote for him.

Goldman, who died on Friday at his New York home, is understood to have been in poor health for some time.

His daughter Jenny Goldman confirmed his death to the Washington Post, citing complications from colon cancer and pneumonia as the cause.

Mia Farrow, Ben Stiller, Michael Sheen and director Ron Howard were among many to pay tribute.

Skip Twitter post by @MiaFarrow Legendary William Goldman, has died. He gave us ‘The Princess Bride’, ( book even better than the film) ‘Butch Cassidy-’ screenplay of "All the President's Men’ and best book on show biz, ‘Adventures in the Screen Trade’. He was also a true friend. Thank you dear Bill pic.twitter.com/dcwfYPd3ue — Mia Farrow (@MiaFarrow) November 16, 2018 Report

Skip Twitter post by @RedHourBen William Goldman was huge part Of creating some of the seminal movies of the 70’s and beyond. His book on screenwriting was a touchstone for me and I always felt star struck and intimidated seeing him at Knicks games. #RESPECT https://t.co/ED9HUJc50R — Ben Stiller (@RedHourBen) November 16, 2018 Report

Skip Twitter post by @michaelsheen William Goldman made my life, like so many millions of others, better and richer and more full of possibility because of what he wrote. What a gift. So sad today and so grateful. #WilliamGoldmanRIP pic.twitter.com/in3YOs8Pgm — michael sheen (@michaelsheen) November 16, 2018 Report

Skip Twitter post by @RealRonHoward RIP #WilliamGoldman. One of the greatest most successful screenwriters ever. I was lucky as hell to count Bill as a mentor and a friend. Check his credits & see a William Goldman movie or read a Goldman book over the holiday & give thanks that we had his voice in our world. https://t.co/RWRdCoO1Cm — Ron Howard (@RealRonHoward) November 16, 2018 Report

Others have marked his passing by remembering some of the iconic dialogue he created.

Skip Twitter post by @scott_tobias “What happened to the old bank? It was beautiful.”



“People kept robbing it.”



“Small price to pay for beauty.”



R.I.P. William Goldman — Scott Tobias (@scott_tobias) November 16, 2018 Report

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.