NORFOLK, Va. — A Marine commando pleaded guilty on Thursday to negligent homicide charges in the 2017 death of a Green Beret soldier in Mali, describing how he helped duct-tape the wrists and feet of the victim, who was choked in a hazing incident.

The commando, Staff Sgt. Kevin Maxwell Jr., told a military court that the attack on Army Staff Sgt. Logan J. Melgar, 34, had “started out as a hypothetical joke” among Special Operations forces who were out drinking in Bamako, the Malian capital.

Hours later, four American commandos broke into Sergeant Melgar’s bedroom, wrestled him to his bed and twice put him in a “blood choke” — causing him to pass out at least once, Sergeant Maxwell testified.

The joke had progressed to “yes, we’re going to do this,” Sergeant Maxwell said in court. During two hours on the stand, he said he had become friends with Sergeant Melgar.