Frank Pierson, a Hollywood writer and director who earned an Oscar for writing Dog Day Afternoon, has died. He was 87.

He died Sunday at Cedars-Sinai hospital in Los Angeles, according to his manager Susan Landau.

Pierson also wrote 1965’s Cat Ballou and 1967’s Cool Hand Luke, both nominated for an Academy Award for screenwriting. Both are famous for their rebel humour, including Cool Hand Luke's most famous line "What we got here is... failure to communicate."

Dog Day Afternoon was based on a real Brooklyn robbery and hostage taking and a Life article about it by P.F. Kluge, called The Boys in the Bank. The film earned five Oscars, including best picture and best director for Sidney Lumet. Al Pacino, as the leading man and robber, was considered a quintessential anti-hero, as well as uttering one-liners such as "Alright, it's the FBI, so nobody give your real name."

More recently, Pierson was actively working as a consultant on the current season of AMC's Mad Men and even co-wrote one of this past season's scripts, titled “Signal 30.”

He also was consulting producer on The Good Wife in 2010. He first wrote for TV with Have Gun, Will Travel in 1959 and was creator of the James Garner TV series in the early 1970s.

Pierson had a memorable TV directing career, with credits such as Truman, a 1995 biopic of the former president, and Conspiracy, a 2001 drama about a Nazi conspiracy. He won Emmys for both TV movies.

He famously directed Barbra Streisand in A Star is Born, and wrote a first-person account of how difficult she was to direct, calling her manipulative and a control freak.

Pierson was president of the Academy of Motion Picture Arts and Sciences from 2001 to 2005 and president of the Writers Guild of America for two terms, as well as a professor at the University of Southern California’s film school.

Pierson was born May 12, 1925, in Chappaqua, N.Y., and was educated at Harvard University. He served as a correspondent for Time magazine and was also an ad copy writer before going into TV writing.

His film directing debut was with The Looking Glass War in 1969. Screenwriting credits included The Anderson Tapes, Presumed Innocent, In Country, The Looking Glass War, The Happening and King of the Gypsies.

Pierson is survived by his wife Helene, his children, Michael and Eve, and five grandchildren.