Beating retreat

The Beating Retreat is a ceremony performed by armies and other military groups. It began in England during the 1600s. At first, people used it to tell soldiers on patrol that it was time to go back to the castle.
Examples.
The Indian Border Security Force and Pakistani Pakistan Rangers use the beating retreat for the Wagah border closing every day. They started doing this in 1959. Michael Palin videoed it for one of his television programmes. He said it was "carefully choreographed contempt".