Hector Delgado gave up being a reggaetón artist five years ago to become an evangelical preacher in Puerto Rico. So it was something of a surprise when his former manager, Javier Gómez, called him three weeks ago and said his voice could be clearly heard on “Harlem Shake,” a song that had gone viral on the Internet and then climbed to the top of the pop chart.

He wasn’t alone. Jayson Musson, a rapper from Philadelphia, received an excited call from another member of the former rap collective Plastic Little, who told him that his voice could be heard on the hit song as well, yelling out the key phrase “Do the Harlem Shake!”

Neither gave permission to the song’s producer and writer, Harry Bauer Rodrigues, who records under the name Baauer, to use snippets of their records, they said. “It’s almost like they came on my land and built a house,” Mr. Delgado said.

Both Mr. Musson and Mr. Delgado are seeking compensation from Mad Decent Records, which put out the single last year. The label and Mr. Rodrigues declined to comment. But the tale of how an obscure dance track containing possible copyright violations rose to the top of pop charts illustrates not only the free-for-all nature of underground dance music but also the power of an Internet fad to create a sudden hit outside the major-label system.