A report from the Ukrainian town of Feodosiya claims Russia has been broadcasting propaganda to local people over loudspeakers – and that Ukrainian troops have responded by blasting back the music of American pop singer Cher.

As weapons go, The Shoop Shoop Song seems harmless enough. But music can be a devastating tool of psychological warfare, says Herbert Friedman, a former US army sergeant major who has researched the subject.

“There are two main purposes,” Friedman told the BBC’s Today programme. “One is that for your side it’s a great morale booster – it encourages your men to march forward, to fight. At the same time, it can terrify your enemy; it can keep them awake, lower their morale. It can actually confuse them, if the music is odd enough.”

In his book The Men Who Stare at Goats, British journalist Jon Ronson documents how the US Army played music to Iraqi prisoners of war to disorient them before interrogation. Their selection ranged from Metallica’s Enter Sandman to the I Love You song from the children’s TV show Barney & Friends.

In turn, the right choice of song can be a form of defence. British naval officers have found that blasting Britney Spears hits from their ships deters attacks by Somali pirates. “It’s so effective the ship’s security rarely needs to resort to firing guns,” Second Officer Rachel Owens told Metro. “As soon as the pirates get a blast of Britney, they move on as quickly as they can.”

Show no mercy

At the Battle of the Alamo in 1836, the Mexican General Santa Anna played El Degüello, a song that appealed to the enemy to surrender or die by the sword, in an attempt to frighten the Texan defenders into either fleeing or surrendering. “It meant nobody survives, we kill everybody,” says Friedman. “When you heard that, you knew the line had been drawn and you’d die.”

During the siege of the Iraqi city of Fallujah in April 2004, Associated Press reported that US marines played songs including AC/DC’s Hell’s Bells to unnerve insurgents, while in 1989 American troops used rap and pop – including Never Gonna Give You Up by Rick Astley – to flush out the Panamanian leader Manuel Noriega from his hiding place in the Vatican Embassy.

Music has other uses in conflict besides aural assault. It can lift the spirits of soldiers and bond them together. During World War II, songs like When the Lights go on Again and Praise the Lord and Pass the Ammunition motivated Allied troops – while German forces listened to Wagner’s Ride of the Valkyries for inspiration. The music by Hitler’s favourite composer went on to feature in an iconic scene from the Vietnam War film Apocalypse Now – and was played by US troops in the 1991 Gulf War. “Nobody can hear The Ride of the Valkyries without seeing the helicopters coming in,” says Friedman. “When we crossed the border in Desert Storm, our helicopters played it.”

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.