Among the eight names listed as co-writers of Jennifer Lopez's new single "On the Floor," a couple stand out: Ulises Hermosa, who died in 1992, and his brother Gonzalo, a pair of Bolivian folk musicians who belonged to a movement called música folklórica that's pretty much what it sounds like. You probably don't know their names, but it's a sure thing you've heard at least one of their melodies.

In 1981, the Hermosa brothers's folk group Los Kjarkas recorded an insanely catchy song called "Llorando Se Fue." Its lyrics are boilerplate stuff—"the one who made me cry is crying now"—but it's got a terrific, sneaky melody, with phrases that go on longer or shorter than they seem like they're about to, and a skipped beat near the end of the chorus. It takes a lot to make panpipes sound cool even outside of a música folklórica context, but they pulled it off. (That video linked above was made a bit later, but it's worth watching for its ridiculous karaoke-laserdisc production values.)

The Peruvian group El Cuarteto Continental, covered "Llorando Se Fue" in 1985, and turned the panpipe line of Los Kjarkas' version over to an accordion. The next year, the Brazilian pop singer Márcia Ferreira juiced up the rhythm of the Cuarteto Continental arrangement, translated Los Kjarkas' Spanish lyrics into Portugese, and recorded the song as "Chorando Se Foi." In Ferreira's version, she's still singing about crying, but you wouldn't know it from her come-hither delivery.

Here's where the story gets complicated. A French producer named Olivier Lamotte d'Incamps apparently heard "Chorando Se Foi" on a trip to Brazil in 1988, and saw a bunch of young people doing a dance they called lambada. He subsequently organized a band called Kaoma, which mostly consisted of ex-members of the Senegalese-French band Touré Kunda (here's an early Touré Kunda song, "Salaly Muhamed").

Kaoma's first single was simply called "Lambada"—although it was in fact a retitled, slightly more vigorous cover of "Chorando se foi," with a cry of "dançado lambada!" thrown in at the end.

Its original writing credit was the suitably Brazilian-sounding Chico de Oliviera. Released in 1989 with a gigantic publicity push, "Lambada" became a huge worldwide hit. In the spring of 1990, there were even two simultaneously released cheapo lambada exploitation movies: Lambada and The Forbidden Dance, the latter of which prominently featured Kaoma's recording, as well as an English-language cover by Kid Creole & the Coconuts.

Other versions of "Lambada" turned up elsewhere: in Japan, the hit recording was by Akemi Ishii; in India, as "Sochna Kya Jo Bhi Hoga," the song appeared in the popular 1990 movie Ghayal. The (all-male) American experimental trio Sun City Girls' 1990 album Torch of the Mystics included a track sneakily titled "The Shining Path," after a Peruvian terrorist organization. It is, in fact, a cover of "Llorando se fue," with its original Spanish lyrics and pan-pipes more or less intact. The Hermosa brothers eventually caught wind of Kaoma's "Lambada"—how could they escape it?—and complained; it turned out that Chico de Oliviera was, in fact, Olivier Lamotte d'Incamps, and the song's original composers ultimately got at least some recognition for their work.

"Lambada," like all crazes, went into hibernation for a while after everyone got sick of it; like all crazes, it came back when people started missing it. Wisin & Yandel's 2006 reggaeton hit "Pam Pam" paraphrases its melody line; Don Omar's current Latin hit "Taboo" is basically just a modernized take on the Cuarteto Continental arrangement of "Llorando se fue."

And now the Hermosa brothers' tune has returned to the American pop charts. "On the Floor" effectively treats "Llorando Se Fue" as a bit of shared but half-forgotten cultural knowledge. In the middle of Lopez and rapper Pitbull's paean to globetrotting and dancing, we hear a fragment of its melody again and again, sometimes in her voice (singing in English, or just singing "la la la", sometimes doubled by the accordion that first brought it to international attention. The peculiar phrasing of "Llorando Se Fue" has been straightened out to a foursquare club beat; J.Lo's version never gets past the first line of the original tune. But it still carries a hint of its peculiar history: a traveler that voyaged out so far and changed so much that its parents had to struggle to reclaim it.