Image copyright Getty Images Image caption Demonstrations took place outside the Starbucks in Philadelphia, Pennsylvania, on Sunday

Coffee chain Starbucks has apologised after two black men were arrested while waiting for a friend at one of their shops in the US city of Philadelphia.

Amateur video shows police placing the pair, who were accused by shop staff of trespassing, in handcuffs.

The footage has been widely shared since it was posted on Twitter and has led to accusations of racial profiling.

Starbucks chief executive Kevin Johnson said the video was "hard to watch" and that the actions taken were "wrong".

In the incident, which took place on Thursday evening, the two men were approached by the store manager and asked to leave after they requested the use of the toilet without making a purchase, police said.

In response, the men told staff that they were waiting for a friend and refused to leave.

Philadelphia police commissioner Richard Ross said his officers were right to carry out the arrest after staff told them the pair were causing a disturbance and trespassing.

"If a business calls and they say that someone is here that I no longer wish to be in my business, they [the officers] now have a legal obligation to carry out their duties," Mr Ross said.

In a statement released on Saturday, Mr Johnson expressed "our deepest apologies" to the two men involved in the incident and said Starbucks would do "whatever we can to make things right".

"The video shot by customers is very hard to watch and the actions in it are not representative of our Starbucks mission and values," Mr Johnson said.

He added that the call to the Philadelphia police department should not have been made on the "basis" of the events which took place beforehand.

However the footage of the incident, which has received nearly nine million views so far, sparked criticism and calls for a boycott of the Starbucks coffee store.

On Sunday, people gathered outside the shop in protest.

The company now plans to investigate its practices in order to "prevent such an occurrence from ever happening again", Mr Johnson said.