In the Epistle Dedicatory that precedes Man and Superman, George Bernard Shaw contended that “in Shakespeare’s plays, the woman always takes the initiative”. This may be true for some of the comedies or problem plays – take Rosalind in As You Like It or Mariana in Measure For Measure – but it is certainly not true of Julius Caesar. There are only two female roles, both minor domestic sideshows to the political power games. In this audacious all-female production at the Donmar Warehouse, Phyllida Lloyd redresses this grievance with flair.

This production has several notable precedents: there was an all-female Julius Caesar at Colchester’s Mercury Theatre in 2007, and Lloyd herself directed an all-female Taming of the Shrew at the Globe in 2003. However, perhaps the most significant influence on Lloyd was Caesar Must Die, the Italian docudrama about prison inmates rehearsing a version of Julius Caesar – for Lloyd’s production, too, takes place in a prison. Given that Caesar Must Die and Lloyd’s The Iron Lady were screened at the Berlin Film Festival – where the former won the Golden Bear – this homage is likely deliberate.

In a postmodern flourish, Lloyd makes clear that we are watching not a staging of Julius Caesar but a staging of a staging. The female inmates are acting out the play in the prison’s confines, and, tellingly, the text’s gender references are not changed; there is no “friends, Romans, countrywomen”. This underlines not just the play’s exploration of authority and power, but also its brutality: this is a very physical, energetic production, which frequently evokes the exhilaration of a prison riot. Actors jump from the metal walkways of the austere set; demonstrations and battles are soundtracked by Gary Yershon’s heavy metal score. At some points, the prison reality intrudes on the play itself; in one particularly savage moment, the Roman mob’s assault on Cinna the poet gets out of hand and the prison warden has to intervene.

For the most part, the production works. Its vigour and judicious textual edits ensure that Julius Caesar’s interval-less two hours go by very quickly. The ingenious on-stage use of a guitar and drumkit give musicality to a play that can risk being staid; Tom Gibbons’s sound design excellently conveys the capriciousness of the Roman crowd; there is an ingenious moment in which a wild dog (Carolina Valdés) tries to warn Caesar of the Ides of March.

That’s not to say it is completely successful. In one of Lloyd’s more over-the-top embellishments, Caesar forces a doughnut into Cassius’s mouth; this is a literal expression of the production’s tendency to bite off more than it can chew. There is a awful lot going on here, and there are some odd directorial decisions: why does the soothsayer ride a buggy and, later, wander the stage nude holding a baby? Some of the props, too, are a little cheap: the crepe paper crown in a Tupperware box, for example, or the cardboard print-out Caesar masks that his followers wear.

However, we forget all of these flaws amid the brilliant acting. The true measure of a good Julius Caesar is the portrayal of Brutus, and by this yardstick the production is a triumph: Harriet Walter, with her slicked-back hair and gaunt, hollowed-out cheeks, is an extraordinary presence, fully conveying the senator’s clashing impulses. Jenny Jules’s Cassius is intense, and Isha Bennison’s resigned Casca a frequent source of comic relief. The excellent Charlotte Josephine, too – soon to bring her monologue Bitch Boxer to the Soho Theatre – is also given a role as Brutus’s servant Lucius, a role too small to showcase her talents fully but which does allow her to showcase her saxophone skills.

Due to the production’s feminist conceit, the speeches that do address gender issues acquire a special resonance. Much is made of Act II Scene IV, when Brutus’s wife Portia pleads with her husband to consider her equal to her male counterparts: “I have a man’s mind but a woman’s might”. However, as the play goes on, this kind of debate seems increasingly tangential. As we become absorbed in the play, we forget about the gendered casting completely; it ultimately comes down to the universal human concerns of power, ambition and betrayal. In describing her goals for this production, Phyllida Lloyd has been forthright: she wants to show that women can do a play like Julius Caesar. The casting is an initial shock, but rapidly the show cuts right through to the human – and that is the greatest success of all.

Julius Caesar continues at the Donmar until 9 February. More information can be found on the theatre’s website.