Hamlet has been sent away to England by his uncle/stepfather, Claudius, the king. However, he writes to Horatio to tell him that, having been only two days at sea, “a pirate of very warlike appointment” began to chase his ship (4.6.15-16). In the following battle, the pirates took Hamlet captive; they treated him well and brought him back to Denmark. He has, in return, promised to do them a favor.