Image copyright AP Image caption Sir Peter Shaffer worked frequently with the National Theatre

British playwright Sir Peter Shaffer, who won an Oscar for Amadeus and wrote Equus, has died at the age of 90.

Sir Peter was on a visit to Ireland and died with his niece Cressida at his side, his agent said.

He had won Tony Awards for both Amadeus and Equus, which was later revived with Harry Potter actor Daniel Radcliffe in his West End lead debut.

National Theatre director Rufus Norris described him as "one of the great writers of his generation".

He added: "The National Theatre was enormously lucky to have had such a fruitful and creative relationship with him. The plays he leaves behind are an enduring legacy."

His other plays included Black Comedy, Lettice and Lovage, The Royal Hunt of the Sun and Five Finger Exercise.

Image copyright Getty Images Image caption Simon Callow played Mozart in a stage production of Amadeus in 1980, alongside Felicity Kendal

Actor Simon Callow, who starred in a stage production and the film version of Amadeus, as well as appearing in Equus, remembered Sir Peter as a very hands-on writer who knew how to "hold" an audience.

"I'll never ever forget as long as I live the two years that Paul Schofield, Felicity Kendal and I did Amadeus," he said.

"We never had a single performance where the audience wasn't utterly rapt and that was Peter's pure, theatrical instinctive genius."

Equus and Amadeus both premiered at the National Theatre, in 1973 and 1979 respectively, before enjoying long runs in the West End and on Broadway.

Image copyright PA Image caption Daniel Radcliffe starred in the stage version of Equus in 2007

In Equus, Peter Firth played the role of the young man Alan Strang when the play was first put on by the National Theatre.

It opened on Broadway the following year, with Firth playing opposite Anthony Hopkins as psychiatrist Dr Martin Dysart. The role was later taken on by Richard Burton.

On Broadway it won two Tonys during its first run in 1975, and it won another Tony when the Radcliffe production moved to New York in 2009.

It told the story of a psychiatrist who takes on the case of a disturbed young man who has blinded six horses.

The film version in 1977 starred Burton and got three Oscar nominations including best screenplay for Sir Peter.

Amadeus, a biopic based on the life of Mozart, was made into a film directed by Milos Forman and starring Tom Hulce as Mozart and F Murray Abraham as court composer and rival Antonio Salieri.

Image copyright AFP Image caption The 2007 stage version of Equus also starred Jenny Agutter and Richard Griffiths

It went on to win eight Oscars in 1985, including best picture and a screenwriting Oscar for Sir Peter. It told the tale of the wrangling, both professional and personal, between Wolfgang Amadeus Mozart and Salieri.

The play won five Tony awards on Broadway, including one for Sir Ian McKellen in the role Salieri.

The Chichester Festival theatre opened in 2014 with a new production of Amadeus, starring Rupert Everett as Salieri and Joshua McGuire as Mozart.

A new production of Amadeus will open in October at the National, with Lucian Msamati playing court composer Salieri and live orchestral accompaniment by Southbank Sinfonia.

Image copyright AP Image caption Actors Burt Lancaster [L] and Kirk Douglas [R] presented Sir Peter with his Oscar in 1985 for Amadeus

Sir Peter was born in Liverpool in 1926 and was educated at Trinity College, Cambridge.

He was knighted in the New Year honours list in 2001.

He is survived by his brother, Brian, nephews Milo and Mark and nieces Cressida and Claudia, whose father and Sir Peter's twin, the playwright and screenwriter, Anthony Shaffer, died in 2001.

His close family and friends said in a statement that they wanted to extend their sincere thanks to the staff who cared for him so well at Bon Secours Hospital and Marymount Hospice in Cork.

A private funeral in London will be held shortly and details of a memorial ceremony will be announced in due course.