A video has emerged allegedly showing how a New York police officer frisked men in Muslim dress only 20 minutes after ignoring the same men dressed in Western clothes.

The authenticity of the video has not been confirmed and the New York Police Department (NYPD) has not commented.

YouTube stars Adam Saleh and Sheiikh Akbar, who are usually known for making fun prank videos, set up the experiment to reveal the problem of racial profiling in the US.

The video, which has gathered more than 350,000 views, sees the officer look on as the two men, dressed in Western clothes, argue and push each other while walking along the street.

But 20 minutes later, the officer intervenes as the men replay the scenario, this time dressed in traditional Muslim clothing. The officer can be heard asking them both why "they are dressed like this?"

When the men try to walk away from the officer, he blocks them and pushes them against the wall to be searched.

The officer continues to shout: "What's in your pocket, is that a gun or is that a knife?" The two men then reveal that they set up the scenario.

Saleh said the video was a typical example of what happens when they make videos while in their Islamic dress.

"We just want to make racial profiling come to an end. Too many innocent people get stopped and frisked every day because of what they wear or their skin colour," he said.

"We're against people stereotyping others because of what they wear or what skin colour they are."

In a separate tweet, Saleh said: "And this doesn't just happen to me, it also happens with Muslim women wearing hijab and people with a skin color that isn't white.

"Don't think this is gonna stop me from wearing my Arab clothes...Ima continue to wear it and film what I want without any harm to anyone."