Image copyright AP Image caption People waving the flags said they were staging a protest

People waving Confederate flags have greeted President Barack Obama as he arrived at his hotel in Oklahoma.

As his motorcade rolled into Oklahoma City on Wednesday night, about 10 rebel flags were in the crowd, alongside some US flags.

Critics of the emblem, used in battle by southern states in the US Civil War, say it is a symbol of slavery.

A backlash against the flag has grown since a gunman killed nine black people at a church bible study last month.

Dylann Roof, who was charged with the killings, was pictured holding the flag.

The incident comes a week after the flag was removed from the grounds of the South Carolina state capitol grounds in Columbia, after years of bitter argument.

Large retailers like Walmart have also been clearing their shelves of any trace of the emblem.

But some of the flag-wavers told local newspaper Tulsa World that the flags were not "a racial thing" but merely "in protest".

Image copyright Getty Images Image caption President Obama was greeted by Oklahoma governor Mary Fallin upon his arrival

There were also people holding US flags and signs supporting the president.

People took to social media to express how they felt about the contentious flag flying upon Mr Obama's arrival, saying the actions of a few do not represent the people of Oklahoma.

Image copyright Ashley Gold

Image copyright Ashley Gold

Others shrugged it off and said the US president has dealt with this kind of thing before.

Others called flying the flags "supporting Oklahoma heritage".

Image copyright Ashley Gold

Image copyright Ashley Gold

Mr Obama was in Oklahoma to visit El Reno Federal Correctional Institution, making him the first sitting president to visit a federal prison.