At the end of Act 1, Scene 5 of Hamlet, after the Ghost reveals Claudius's murder, Hamlet demands that Horatio and Marcellus swear upon his sword that they will never reveal what they witnessed that night.
The sword serves as a makeshift cross—a sacred oath-taking object. Hamlet makes them swear multiple times, each time moving the sword to a new position, emphasizing the absolute secrecy required. This oath binds them to his confidence and sets in motion the "antic disposition" strategy that drives the play's middle acts.