Even though it looks decorative, it is actually a functional weapon accessory, combining utility with ornate artistry it is a hallmark of traditional Moroccan metalwork.
The flask is a traditional Moroccan gunpowder container, often called a baroud flask. It is used to store and dispense gunpowder for firearms, especially historical rifles.