D'Oyly Carte Opera Company be released from the partnership on several occasions. Nevertheless, they coaxed eight comic operas out of Gilbert and Sullivan in the 1880s. When "Princess Ida" closed after a comparatively short run of nine months, for the first time in the partnership's history, the next opera was not ready. To make matters worse, Gilbert suggested a plot in which people fell in love against their wills after taking a magic lozenge – a scenario that Sullivan had previously rejected, and he now rejected the "lozenge plot" again. Gilbert eventually came up with a new idea and began work in May 1884.
Gilbert and Sullivan of trade between England and Japan, Japanese imports, art and styles became fashionable in London, making the time ripe for an opera set in Japan. Gilbert said, "I cannot give you a good reason for our... piece being laid in Japan. It... afforded scope for picturesque treatment, scenery and costume, and I think that the idea of a chief magistrate, who is... judge and actual executioner in one, and yet would not hurt a worm, may perhaps please the public." Setting the opera in Japan, an exotic locale far away from Britain, allowed Gilbert and Sullivan to satirise British politics