NEW YORK — William Goldman, the Oscar-winning screenwriter and Hollywood wise man who won Academy Awards for "Butch Cassidy and the Sundance Kid" and "All the President's Men" and summed up the mystery of making a box office hit by declaring "Nobody knows anything," has died. He was 87.

Goldman's daughter Jenny said her father died early Friday in New York due to complications from colon cancer and pneumonia. "So much of what's he's written can express who he was and what he was about," she said, adding that the last few weeks, while Goldman was ailing, revealed just how many people considered him family.

Goldman, who also converted his novels "Marathon Man," ''Magic," ''The Princess Bride" and "Heat" into screenplays, clearly knew more than most about what the audience wanted. He was not only a successful film writer but a top script doctor, the industry title for an uncredited writer brought in to improve or "punch up" weak screenplays.

Goldman also made political history by coining the phrase "follow the money" in his script for "All the President's Men," adapted from the book by Washington Post reporters Bob Woodward and Carl Bernstein on the Watergate political scandal. The film starred Robert Redford as Woodward and Dustin Hoffman as Bernstein. Standing in the shadows, Hal Holbrook was the mystery man code-named Deep Throat who helped the reporters pursue the evidence. His advice, "Follow the money," became so widely quoted that few people realized it was never said during the actual scandal.

A confirmed New Yorker, Goldman declined to work in Hollywood. Instead, he would fly to Los Angeles for two-day conferences with directors and producers, then return home to fashion a script, which he did with amazing speed. In his 1985 book, "Adventures in the Screen Trade," he expressed disdain for an industry that elaborately produced and tested a movie, only to see it dismissed by the public during its first weekend in theaters.

"Nobody knows anything," he remarked.

Screenwriter and filmmaker Aaron Sorkin called Goldman a mentor.

"He was the dean of American screenwriters and generations of filmmakers will continue to walk in the footprints he laid," Sorkin said in a statement. "He wrote so many unforgettable movies, so many thunderous novels and works of non-fiction, and while I'll always wish he'd written one more, I'll always be grateful for what he's left us."

Goldman launched his writing career after receiving a master's degree in English from Columbia University in 1956. Weary of academia, he declined the chance to earn a Ph.D., choosing instead to write the novel "The Temple of Gold" in 10 days. Knopf agreed to publish it.

"If the book had not been taken," he told an interviewer, "I would have gone into advertising ... or something."

Instead, he wrote other novels, including "Soldier in the Rain," which became a movie starring Steve McQueen. Goldman also co-authored a play and a musical with his older brother, James, but both failed on Broadway.

James Goldman would later write the historical play "The Lion in Winter," which he converted to film, winning the 1968 Oscar for best adapted screenplay.

William Goldman had come to screenwriting by accident after actor Cliff Robertson read one of his books, "No Way to Treat a Lady," and thought it was a film treatment. After he hired the young writer to fashion a script from a short story, Goldman rushed out to buy a book on screen writing. Robertson rejected the script but found Goldman a job working on a screenplay for a British thriller. After that he adapted his novel "Harper" for a 1966 film starring Paul Newman as a private eye.

He broke through in 1969 with the blockbuster "Butch Cassidy and the Sundance Kid," starring Newman and Redford. Based on the exploits of the real-life "Hole in the Wall" gang of bank robbers, the movie began a long association with Redford, who also appeared in "The Hot Rock," ''The Great Waldo Pepper" and "Indecent Proposal."

Other notable Goldman films included "The Stepford Wives," ''A Bridge Too Far" and "Misery." The latter, adapted from a Stephen King suspense novel, won the 1990 Oscar for Kathy Bates as lead actress.

In 1961 Goldman married Ilene Jones, a photographer, and they had two daughters, Jenny and Susanna. The couple divorced in 1991.

Born in Chicago on Aug. 12, 1931, Goldman grew up in the suburb of Highland Park. He graduated from Oberlin College in 1952 and served two years in the Army.

Despite all his success as a screenwriter, Goldman always considered himself a novelist and didn't rate his scripts as great artistic achievements.

"A screenplay is a piece of carpentry," he once said. "And except in the case of Ingmar Bergman, it's not an art, it's a craft."

___

The late AP Entertainment Writer Bob Thomas contributed to this report.