Islamic State militants may behead those who don't follow their extremist views, but the organization is better on race than the US, they're claiming in tweets that see a kinship with the "rebel" Baltimore protesters.

"In the Islamic State is no difference between black and white," tweets one militant, echoed by others, with a photo of his fellows. It's impossible to determine, however, if they are different races because their faces are largely covered by black masks.

Another tweets: "Different languages, different colours, different nationality, but one God."

Another message announces that the US Army is preparing to "smash black Americans" in the streets of Baltimore, while others characterize the protesters as fellow "rebels." It's "going down in Baltimore! Sharia for America!" exults one. Another notes: "We need to teach them how to defend themselves. Who has the Molotov cocktail instructive pic?"

The flood of messages is similar to those issued as residents in the town of Ferguson, Missouri, protested and rioted last year in the wake of the shooting death of African-American Michael Brown by white police officer Darren Wilson, Foreign Policy reports.

At that point a British-born IS militant posted a message to protesters, saying: "We will help you if you accept Islam and reject corrupt man-made laws like democracy and pledge your allegiance to Caliph Abu Bakr, and then we will shed our blood for you and send our soldiers that don't sleep, whose drink is blood."

The Islamic State is far from the only foreign power blasting the American record of race relations. Iran's Ayatollah Ali Hoseini Khamenei has condemned police brutality, which he views as racist. "It's ridiculous that even though US president is black, still such crimes against US blacks continue to occur," he said in a speech.