A detachment (from the French détachement) is a military unit. It can either be detached from a larger unit for a specific function or (particularly in United States military usage) be a permanent unit smaller than a battalion. The term is often used to refer to a unit that is assigned to a different base from the parent unit. An example is the United States Army's 1st Special Forces Operational Detachment-Delta (Airborne) (SFOD-D), commonly known as Delta Force by the general public.
Detachment is also the term used as the collective noun for personnel manning an artillery piece (e.g. gun detachment).