Verdi wrote the work for Naples as Gustavo III, on Antonio Somma's reworking of a Scribe libretto about the assassination of the Swedish king at a masked ball. Neapolitan censors, alarmed by an attempt on the life of Napoleon III, demanded changes the composer refused, and the contract collapsed into litigation. The opera went to Rome instead, with the action displaced to colonial Boston and the king demoted to a governor, and opened at the Teatro Apollo on 17 February 1859. Ulrica's cave and Amelia's midnight scene at the gallows field belong to the same act.