William Shakespeare was no stranger to the task of plying his trade amid difficult conditions.

He was working in London when the bubonic plague surfaced in 1592 and again in 1603, the latter a particularly lethal outbreak that left more than 30,000 city dwellers dead.

In 1606, as England was roiling from a near-assassination attempt on King James, the plague returned to wreak havoc on Londoners once again.

But Shakespeare knew how to navigate the bumpy terrain by this point, the threats of royal upheaval and a debilitating illness no obstacle to him completing three of his great tragedies – King Lear, Macbeth and Antony and Cleopatra – in that year alone.

READ MORE: Why Is William Shakespeare’s Life Considered a Mystery?

The Gunpowder Plot influenced 'Macbeth' and 'King Lear'

In November 1605, authorities uncovered three dozen barrels of gunpowder beneath London’s Palace of Westminster as part of efforts to assassinate King James and the House of Lords.

Although the conspirators in the “Gunpowder Plot” were captured, as noted by Shakespeare scholar James Shapiro in The Year of Lear, their trial and executions carried the haunting reminder of the brush with anarchy well into 1606 and colored the output of the celebrated playwright.

This included his writing of King Lear, the bleak tale of a king blind to the true nature of his daughters, and especially Macbeth, about a nobleman driven to madness by his murderous ambition to seize the throne of Scotland.

A scene from King Lear

A scene from "King Lear"

Shakespeare likely wrote 'Antony and Cleopatra' while isolated during a plague

That summer, Shakespeare and his contemporaries were distracted from recent events concerning the monarchy when the black death made an unwelcome return.

The 1603 outbreak had brought a directive from the privy council that closed playhouses when more than 30 disease-related deaths were recorded in a week, and with London again facing those casualty levels by July 1606, the Bard was forced to shutter his venue, the Globe Theatre.

This produced an attempt to recoup lost income via touring performances with his company, the King’s Men, while also leaving time for the wordsmith to sit alone with his thoughts and pen.

The evidence indicates that Shakespeare polished off Antony and Cleopatra, the successor to the Roman Empire intrigue of Julius Caesar, during this period, its debut likely arriving when the Globe reopened late in the year.

Even as he ostensibly worked in isolation, the plague threatened to ensnare Shakespeare in its invisible grasp. Shapiro describes how his landlady on London's Silver Street, Marie Mountjoy, succumbed to the illness in October 1606, prompting the writer to vacate the premises shortly afterward.

READ MORE: Was Shakespeare the Real Author of His Plays?

Mentions of these contemporary events appear in his plays

It's impossible to know how the ever-present dangers affected the well-being of the Bard, who left behind no personal letters, though there are clues to be found in his plays.

Lear provided an apt description of the plague’s ghastly symptoms by way of the king's insult to his daughter Goneril: "Thou art a boil, A plague-sore, an embossed carbuncle, In my corrupted blood."

And while Macbeth lamented "The dead man's knell" associated with the plague, the play also delivered a clear nod to the doublespeak employed by the masterminds of the Gunpowder Plot by referencing “th’equivocation of the fiend, that lies like truth.”

All in all, it was a trying time to attempt to carry on business as usual, but Shakespeare did so in a manner worthy of his celebrated reputation, by funneling the fear and uncertainty swirling around into some of the greatest written works of the English language.