LOS ANGELES — William Goldman, who won Oscars for his original screenplay for "Butch Cassidy and the Sundance Kid" and his adaptation of "All the President's Men," died on Friday in his Manhattan home, according to the the Washington Post. He was 87.

His daughter Jenny Goldman cited complications from colon cancer and pneumonia as the cause of his death.

"Butch Cassidy," a revisionist Western that helped popularize the buddy movie, announced Goldman as a screenwriter able to balance big laughs with a sense of adventure, while "All the President's Men" cemented his status as a deft writer of suspense. The two are considered to be among the finest screenplays ever written and exemplify Goldman's range and versatility.

In a 2015 interview with Signature, Goldman was asked about his ability to bounce from genre to genre.

"You cross your fingers and never stop," he said. "Praying is also good."

Goldman, who frequently transferred his novels, such as "Magic," "The Princess Bride" and "Marathon Man," to the screen, was also a chronicler of the movie business. His books, "Adventures in the Screen Trade" and "Hype and Glory," offer an unvarnished look at the kind of meddling and risk aversion by studio big wigs that all too often neuters creativity. Of the movie business he once famously observed "nobody knows anything," a bit of wry wisdom that is often quoted on studio lots and executive suites.

Goldman also turned his penetrating eyes towards the stage and professional sports, collaborating on accounts of those industries. As with his scripts, he brought acute observation, entertainment value and, especially, wit to even his most serious enterprises. He also did uncredited touch ups on such films as "Indecent Proposal," "The Right Stuff" and "Good Will Hunting" as well as some films he was probably happy not to have on his resume, such as the Arnold Schwarzenegger flop "The Last Action Hero."

In an April 2015 piece on Goldman, the Writers Guild magazine Written By declared: "What's remarkable about 'Butch Cassidy' and Bill Goldman is how many kids they encouraged and how many would-be writers turned themselves into screenwriters by studying the script and the movie and Goldman's memoir 'Adventures in the Screen Trade.'" Further detailing his influence, the magazine said: "His descriptive style, with its literary origins and frequent use of asides and comments, provides a map to a screenwriting path followed enthusiastically by writers from Shane Black to Vince Gilligan."

His 1964 novel "Boys and Girls Together" failed to impress critics, but it became Goldman's first bestseller. That same year came "No Way to Treat a Lady," a comic thriller that also later became a film. It was published under one of the many pseudonyms he used, Harry Longbaugh, the real name of the Sundance Kid.

A screenwriting career came about by accident, Goldman said. Having read an early draft of "No Way," actor Cliff Robertson thought it a film treatment and asked Goldman to adapt the short story "Flowers for Algernon" to the screen. Though none of Goldman's work made it into the movie eventually called "Charley," it was through Robertson that Goldman was brought in to work on the 1965 caper movie "Masquerade," his first produced film, for which he shared the script credit with Michael Relph. He next adapted Ross MacDonald's "The Moving Target," which became the 1966 Paul Newman vehicle "Harper."

Goldman spent a year exploring the 1967-68 Broadway season -- doing everything from attending out-of-town tryouts of every production and to conducting interviews with actors and directors. "The Season: A Candid Look at Broadway" was criticized for bias and snark when it was published in 1969, but reviewers conceded that it was a highly entertaining read.

Also in 1969, Goldman received what was then a high-water mark of $400,000 for his original screenplay "Butch Cassidy and the Sundance Kid." The film starring Newman and Robert Redford was one of the biggest hits of the decade and made Goldman a screenwriter in demand.

Goldman adapted his 1974 novel "Marathon Man" as a bigscreen vehicle for Dustin Hoffman and Laurence Olivier. The ending of the movie was changed without his consent, but the film contained a memorable sequence of torture that still leaves viewers reluctant to return to the dentist's chair. His 1976 novel "Magic" later made it to the screen with Anthony Hopkins.

Goldman always considered himself first and foremost a novelist, but his scripts received so favorable a reception that he could not resist turning out such efforts as heist comedy "The Hot Rock" in 1972, a 1975 adaptation of Ira Levin's "The Stepford Wives" (from which he begged to have his name removed) and "The Great Waldo Pepper," a less-successful Redford vehicle about aviatorial barnstorming.

He had such a strong working relationship with Redford that he was enlisted to adapt "All the President's Men," based on the Watergate investigation by Carl Bernstein and Bob Woodward, in 1976. The film scored at the box office and picked up several Oscar nominations, including one for best picture. However, his next adaptation, of Cornelius Ryan's WWII epic "A Bridge Too Far," was deemed overlong and was a box office disappointment.

Goldman's first venture into television was the four-hour miniseries "Mr. Horn" in 1979. By now his experiences in Hollywood had reached critical mass, and he fictionalized some of those feelings in the 1979 novel "Tinsel."

He adapted his 1973 adult fairy tale "The Princess Bride: S. Morgenstern's Classic Tale of True Love and High Adventure" (1973) for the successful, and enduringly popular, 1987 film. (There was no S. Morgenstern classic tale; that was just a conceit, which he also used in a later work, "The Silent Gondoliers"). The film, a tongue-in-cheek adventure movie did only middling box office in its theatrical run, but became a cult favorite on video. Lines such as "Never go in against a Sicilian when DEATH is on the line," and "as you wish" became fan favorites and entered the popular lexicon.

Several nonfiction efforts also achieved popularity, especially 1983's straightforward and astute account of the movie business "Adventures in the Screen Trade." It became a bestseller. Later in the decade he collaborated with sports writer Mike Lupica on "Wait Till Next Year," which looked at 1987's baseball, football and basketball seasons. In 1990 came "Hype and Glory," an account of Goldman's experiences as a judge for the Cannes Film Festival and the Miss America Pageant.

Though his later work couldn't match the verve and promise of "Butch Cassidy," a 1990 adaptation of Stephen King's novel "Misery" was an exception. The thriller stared James Caan as a novelist imprisoned by his number one fan, Kathy Bates. The actress won an Oscar for her work and fifteen years later, Goldman adapted "Misery" for the Broadway stage in a production starring Bruce Willis. Other Goldman efforts such as "Year of the Comet," "Memoirs of an Invisible Man," "Chaplin," and "The Chamber" were a mixed bag commercially and artistically.

The thrillers "The Ghost and the Darkness," "The General's Daughter," and "Absolute Power" made money, as did a big-screen version of the TV series "Maverick," but by then Goldman was as in demand for his work as a script doctor as he was for his original efforts.

Born in Chicago, Goldman grew up in the Highland Park suburbs. After attending Oberlin College, Goldman served in the military, then returned to school to complete his masters in English at Columbia University in 1956. That year he wrote his first novel, "Temple of Gold," in 10 days, and though he had previously failed to get his early short stories published, Alfred Knopf picked up the coming-of-age tale, and it received good notices.

His next novel, "Your Turn to Curtsy, My Turn to Bow," also dealt with a young male's life crisis; it was followed in 1960 by the well-received "Soldier in the Rain," a tragi-comedy set on a Southern training base. It would be the first of his novels to reach the screen in the mid-'60s.

In 1967 he published the well-regarded marital drama tale "The Thing of It Is..." A bit later came novels including "Father's Day" and the children's book "Wigger." "Control," about a group of people who try to alter the future and the past, was well received when published in 1982. He also wrote "The Color of Light" and "The Brothers," a sequel to "Marathon Man." Goldman collaborated with his brother James, who died in 1998, on a stage comedy, "Blood, Sweat and Stanley Poole," and a musical, "A Family Affair."

Goldman was married to photographer Ilene Jones from 1961 until their divorce in 1991. He is survived by their two daughters, Jenny and Susanna.

Carmel Dagan contributed to this report.