Moments after Luigi Mangione was handcuffed at a Pennsylvania McDonald’s, a police officer searching his backpack found a loaded gun magazine wrapped in a pair of underwear.

The discovery, recounted in court Monday as Mangione fights to keep evidence out of his New York murder case, convinced police in Altoona, Pennsylvania, that he was the man wanted in the killing of UnitedHealthcare CEO Brian Thompson in Manhattan five days earlier.