If Vietnam was the first media war, then Iraq and Afghanistan were the first conflicts of the digital media era, with troops carrying contraband cellphones, cameras and perhaps most important for long convoys: MP3 players loaded with music.

Few tracks circulated on playlists overseas more than Drowning Pool’s “Bodies,” a hard rock song mostly consisting of the throaty, repeated lines of the main chorus: Let the bodies hit the floor.

The troop favorite and its sordid past converged in a strange way this week, when the band played for Freedom Fest, a July 4 show for troops stationed at Naval Station Guantanamo Bay in Cuba, home to the high-profile prison that has held detainees from the global war on terror since Sept. 11, 2001.

The song has a dark history in the military’s post-Sept. 11 era: It was used in at least one instance during harsh interrogation of Mohamedou Slahi, a detainee held at Guantánamo in 2003. An interrogator, identified only as Mr. X, “exposed to variable lighting patterns and rock music, to the tune of Drowning Pool’s ‘Let the Bodies Hit [the] Floor,’ ” according to a 2008 Senate Armed Services Committee probe on prisoner abuse at the facility that misstated the name of the song.

A 2005 U.S. Southern Command inquiry into torture at the base noted music was one technique interrogators used to unsettle detainees but did not mention Drowning Pool specifically.

“Interrogators stated that cultural music would be played as an incentive. Futility techniques included the playing of Metallica, Britney Spears and Rap music,” the inquiry said.

Slahi was freed after 14 years in October 2016 and returned to his native Mauritania without charges, the Miami Herald reported.

He recently told the newspaper that his experience with music during his detention was “twisted on so many levels.”

“Music is supposed to make you happy and make you a better person; sometimes,” he told the Herald by email in response to questions about the July 4 concert and Drowning Pool’s involvement.

Slahi told the Herald it was “quite the coincidence” that the band, and their signature song, were on hand for the festivities at the naval station, which houses 1,500 troops.

“It is likely that leadership was not informed of the potential for negative connotations because individuals were more familiar with the song “Let the bodies hit the floor” than the name of the band that performed it or its past history with detainees,” U.S. Southern Command spokeswoman Col. Lisa Garcia said in an emailed statement.

Drowning Pool has gone on tour with the USO at least five times since 2005 to provide entertainment for troops around the globe, including Iraq and Kuwait.

At the center is “Bodies,” their wildly popular song from their debut album.

A popular song among troops

Released in May 2001, “Bodies” was tailor-made for the headbanging rock crowd, and quickly became a favorite of service members looking for what many call “moto” songs — short for motivation — that combine fast rhythms and vivid details of violence to amp up combat troops heading out on patrol.

Its popularity could be attributed to a convergence of a few factors.

The song was a massive hit in fall 2001, peaking at sixth on Billboard’s mainstream rock charts that August, when service members — mostly in the ripe hard metal demographic of late teens and early 20s — began combat deployments to Afghanistan, the Persian Gulf and later Iraq.

Troops carried their personal laptops with homemade video, and coupled with a proliferation of combat footage from cable news and homemade clips, some started to marry the song to footage coming out of the war.

Brian Castner, a former Air Force bomb disposal technician, said on Twitter that he recalls a video of the song spliced with stock military footage and photos of al-Qaeda leadership appearing as early as October 2001, when he was in Saudi Arabia gearing up for combat. A cursory search for “let the bodies hit the floor Iraq” on YouTube yields a flood of similar videos, and it made an appearance on HBO’s “Generation Kill,” a miniseries about reconnaissance Marines in 2003-era Iraq.

In 2006, David Peisner wrote in Spin that interrogators often mentioned “Bodies” as popular for “psyching up U.S. soldiers and psyching out enemies and captives.” (People also liked pairing it with clips of violent football collisions.)

While the song has a mostly positive reputation in military circles, it has often been fraught with controversy in the general public. Jared Loughner, who killed six people in an attempted assassination of Rep. Gabrielle Giffords in 2011, was a fan.

At the time, the band posted a statement online that the song was “written about the brotherhood of the mosh pit and the respect people have for each other in the pit. If you push others down, you have to pick them back up. It was never about violence. It’s about a certain amount of respect and a code.”

A band representative could not be reached for comment.

One former Army reservist, who declined to be named because of a sensitive government job, told The Washington Post that his unit turned the song into a running cadence as late as 2009, though he was unaware at the time it was used at Guantánamo, he said.

Other veterans contributed memories of the song, including Afghanistan veteran Matt Farwell, who described the song being played by drill sergeants during a ceremony at the end of infantry training at Fort Benning, Ga., in which newly minted infantrymen receive the coveted crossed musket branch insignia. Some also noted Drowning Pool was part of a subgenre of metal groups popular with troops that included bands such as Disturbed and Avenged Sevenfold.

Slahi said in his book “Guantánamo Diary” that “Bodies” resonated in a very different way.

“[The interrogator] started playing a track very loudly — I mean very loudly. The song was, Let the bodies hit the floor. I might never forgot that song.”