William Goldman, who won Academy Awards for his screenplays for “Butch Cassidy and the Sundance Kid” and “All the President’s Men” and who, despite being one of Hollywood’s most successful screenwriters, was an outspoken critic of the movie industry, died on Friday in Manhattan. He was 87.

The cause was colon cancer and pneumonia, said Susan Burden, his partner.

In his long career, which began in the 1960s and lasted into the 21st century, Mr. Goldman also wrote the screenplays for popular films like “Misery,” “A Bridge Too Far,” “The Stepford Wives” and “Chaplin.” He was a prolific novelist as well, and several of his screenplays were adapted from his own novels, notably “The Princess Bride” and “Marathon Man.”

In a business where writers generally operate in relative obscurity, Mr. Goldman became a celebrity in his own right; in his heyday, his name was as much an asset to a film’s production and success as those of the director and stars. Eight of his films each grossed more than $100 million domestically.

Called “the world’s greatest and most famous living screenwriter” by the critic Joe Queenan in a 2009 profile in The Guardian, Mr. Goldman achieved renown in Hollywood in the late 1960s when he sold his first original screenplay, for “Butch Cassidy,” to 20th Century Fox for $400,000 (the equivalent of more than $2.75 million in 2018 dollars), a record for a screenplay at the time.