When Thomas Bernhard wrote his play Minetti for veteran actor Bernhard Minetti in 1976, it introduced a new generation to a performer whose career had seen him play on all of Germany's major stages in the post-Second World War years.

Regarded as "the king of theatre", and with an ego to match such a claim, Minetti joined the Schillertheatre in Berlin in 1957. By the time he first worked with Bernhard in 1974 aged 69, however, as a cantankerous circus ringmaster in The Force of Habit, Minetti's career was in need of a kickstart. Even though it wasn't directly about him, Minetti the play was it.

For an equally provocative Bernhard, this new solo piece about an actor in decline stuck in the lobby of a New York hotel on New Year's Eve became a platform for his own ideas about life and art. Who better to become his voice than an old-time actor who echoed his own frustrations with the world, of which the literary and theatrical establishment became a microcosm?

Almost 30 years on from the play's debut, Minetti finally receives a mainstage UK showing in Tom Cairns's Edinburgh International Festival production, in which Peter Eyre takes the play's title role.

"Actors are always looking for a great role, whatever age they are," says Cairns of his thinking behind doing Minetti, "and actors of this particular age group are always looking for a plum role like this."

"Peter and I talked about doing the play for about three years, and he was very keen. I wanted to work on serious material, and this was out there and seemed to fit the bill."

The choice of play is interesting for Cairns, who has worked extensively as both a director and designer over the last 30 years at major institutions, including the National Theatre in London and Glyndebourne. While Bernhard is regarded as a major figure by scholars of European literature and theatre, his work is rarely seen in the UK.

Bernhard's bloody-minded ban on any of his work being performed or published in or around his native Austria, which he imposed prior to his death in 1989, has only added to his legend.

"He's a towering figure," says Cairns, "and people who've heard of him in this country recognise that, but he was a complex figure. He was quite hostile to his country, and in his own way was quite anti-establishment. His plays are quite angry about prejudice and other things. I knew his plays, but I knew this one had never had an English translation, and isn't done very often, possibly because it can be quite challenging.

"It's complex and jagged, and it relates to King Lear, which this old actor had done 30 years before, and now there's a storm raging outside this hotel, and all these young party-goers are passing through the lobby while he explores his views on art."

In keeping with Minetti's study of an actor's lot, Cairns's production also collaborates with two great dramatic training houses, the Royal Academy of Dramatic Art in London and The Juilliard School in New York.

"Minetti looks at the nature of theatre," says Cairns, "how far one can go with theatre, and how challenged or comfortable people should be when they go to the theatre, but Bernhard does that without being polemical, and because the play's about an actor, he can address all these things."

While the play may have been written for Minetti, other actors have played the role since. This may make things easier for audiences to distinguish between fiction and the real-life person who inspired it.

Like Minetti the actor, American-born, English-schooled and Paris-trained Eyre has had a distinguished career both on stage and screen.

Unlike the character he plays, however, 72-year-old Eyre is very much still in his prime, according to Cairns.

"He's still a very well-respected actor," he says, "and he's done everything, and his career's doing rather well just now, so I think he's enjoying himself, having something to get his teeth into like this.

"I think Peter is finding the debate in the play quite interesting. It's not necessarily a debate he would agree with, but it's one he can be frustrated by. Peter has a big brain."

As for Minetti the man, his work with Bernhard led to a second wind.

While he stayed with the Schillertheatre until the company's demise in 1995, he went on to join the Berliner Ensemble after accepting an invitation from playwright and the Ensemble's then artistic director, Heiner Muller, who directed Minetti in Brecht's Arturo Ui.

Before his death in 1998, Minetti would go on to work with post-modern maestro Robert Wilson and others. It is Bernhard's homage, however, that has kept his name alive in a way that Cairns believes still has a power for audiences today.

"I would just say Minetti is as important as it ever was," he says.

"It's essentially a discussion about human nature and how we behave towards each other. It isn't a play that has any particular political relevance to today, but was written about a particular world, and we use the play to see how that world is influenced by it. Bernhard's plays do have an insistently strong point of view, and with this one there are no half measures."

Minetti, Royal Lyceum Theatre, Edinburgh, August 16-18, 8pm; Aug 17, 2.30pm. www.eif.co.uk