A worker sacked for performing the dance craze "Harlem Shake" in an Australian gold mine had considered safety and only did it on a break, his lawyer said, adding that the prank was harmless.

As many as 15 electrical workers were fired by Barminco, apparently for safety reasons, after video of a small group doing the dance, which involves thrusting and gyrating, in a Western Australian mine was posted online.

The sackings prompted a wave of outrage on social media, with many saying the men were just having fun, while others congratulated the mining firm for taking safety issues seriously.

Lawyer John Hammond, who is representing one of the sacked men Stephen Dixon, who has referred his case to the employment watchdog, said he would focus on whether the men breached safety rules.

"Around town, opinion seems to be very, very split as to whether or not these miners should have been sacked," Hammond told Fairfax Radio late Thursday.

"Everywhere you go people are discussing whether it was right or wrong for the company to have sacked those who engaged in what was a 31-second dance.

"Mr Dixon did consider safety," he added.

"They left their steel capped boots on, they left their headlamps on and left the self-rescuers (small portable oxygen sources) on before they engaged in the 'Harlem Shake'.

"Doing a dance on the spot, jumping up and down gyrating, to me personally, was not a harmful act."

Barminco said safety took unconditional priority in its mines.

"Our teams are well aware of our values and we will not make any exception to this," the company said on its Facebook site.

It is understood that 14 or 15 men were sacked over the video, although only eight -- some of whom removed their shirts -- actually danced while six or seven watched.

The "Harlem Shake" concept originated with a US video blogger named Filthy Frank, but it appears to be a copy-cat version by a group of Australian teenagers that sent the meme viral.

Spinoffs by everyone from firefighters to Norwegian soldiers on cross-country skis have been uploaded online at staggering rates.

Each starts with a helmeted or mask-wearing person dancing unnoticed to a song called "Harlem Shake" by Brooklyn DJ Baauer. Moments later, others break into a wild dance, shaking and twisting.

[Image via Agence France-Presse]