The extremist gunmen in Wednesday’s deadly attack at a Tunisian museum were apparently targeting Westerners, shouting at local Tunisians in Arabic to lower their heads while firing their guns.

Tunisian sources told Fox News Friday that the gunmen appeared to be trying to avoid shooting local Tunisians in the bloody attack that left 21 people dead, yelling “Lower your heads!” to them in Arabic. Twenty of the people killed were foreign tourists.

The two gunmen were killed in a firefight with security forces.

The Islamic State claimed responsibility Thursday for the attack at the National Bardo Museum in the capital Tunis, according to an audio recording posted online.

Thursday's statement described the attack as a "blessed invasion of one of the dens of infidels and vice in Muslim Tunisia," and appeared on a forum that carries messages from the group, The Associated Press reported.

The statement said there were two attackers and they weren't killed until they ran out of ammunition. The statement also promised further attacks.

"Wait for the glad tidings of what will harm you, impure ones, for what you have seen today is the first drop of the rain," the statement, which was also announced by U.S.-based SITE Intelligence Group.

US intelligence officials confirmed to Fox News that they are aware of the tape and are reviewing it. 

Experts say the ISIS claim of responsibility was unusual, suggesting it could be the work of ISIS sympathizers.

"I think (the Islamic State) is probably taking credit for something it may not have played a role in," said Geoff Porter, a security analyst for North Africa.

Many small terror groups are also trying to claim responsibility. The day before Wednesday’s attack, the terror group Ansar al Sharia posted a long video about Tunisian politics and the police, calling for global war and the release of Tunisian jihadists in prison.  The video alluded to "coming momentous events."

There has also been a claim from Ifrikiya al Alam, a Tunisia-based terror cell.  

Several well-armed groups in Libya, which borders Tunisia, have pledged their allegiance to Islamic State.

The gunmen - identified as Yassine Laabidi and Hatem Khachnaoui -- slipped out of Tunisia in December and headed to Libya, Tunisian security official Rafik Chelli told the el-Hiwar el-Tounsi TV channel.

Chelli said authorities did not have details about where or with which group the two had trained, the BBC reported.

Laabidi hailed from the working-class Tunis suburb of Ibn Khaldun, and Khachnaoui was from the western town of Sbeitla, an interior ministry official told The Associated Press. He spoke on condition of anonymity because he was not authorized to speak publicly about the matter.

The Tunisian Secretary of State says the two dead gunmen were recruited in mosques in Tunisia and trained in a "jihadist camp" in Libya. Hundreds of Tunisians make up the ranks of the Libyan branch of ISIS since its formation last November.

Police in Tunisia have arrested five people described as directly tied to the two gunmen, including Khachnaoui's father and a sister, as well as four others in central Tunisia said to be supporters of their cell.

Overall some 3,000 Tunisians have gone to Iraq and Syria to fight with ISIS and other groups.  About 500 have returned to Tunisia.

Victims' families continued to arrive at Tunis' Charles Nicolle hospital Friday to help identify the dead and recover their bodies.

Authorities say victims of the attack include four Italians, three Japanese and three French nationals, two Spanish, two Colombians and citizens from Poland, Britain, and Belgium. The nationalities of the remaining victims are unconfirmed.

The attack in Tunisia-- the only country to emerge from the 2011 Arab Spring uprisings with a functioning democracy -- raises serious concerns about the spread of extremism to the rest of North Africa.

President Obama spoke with Tunisian President Beji Caid Essebsi by phone to offer his condolences, sympathy and support. The White House says Obama offered to keep providing assistance to Tunisia as the investigation proceeds.

President Essebsi is expected to address the nation Friday.  

Fox News’ Greg Palkot and the Associated Press contributed to this report.