(Reuters) - Starbucks Chief Executive Kevin Johnson apologized late on Saturday for the arrests of two black men at a Philadelphia coffee shop last week, which sparked accusations of racial profiling.

Promising to make everything right, Johnson promised a thorough investigation of the incident caught on video by a patron Thursday and shared widely online.

The men were accused of trespassing but have said they were waiting for a friend before ordering.

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

He added, “The basis for the call to the Philadelphia police department was wrong.”

Philadelphia’s police commissioner on Saturday defended the arrest, saying his officers had to act after Starbucks employees told them the pair were trespassing.

Video of Thursday’s incident showed other patrons telling officers the pair were doing nothing wrong and appeared to have been targeted merely because of their race.

Slideshow ( 8 images )

Police Commissioner Richard Ross said he knew the incident had prompted a lot of concern, but said his officers “did absolutely nothing wrong.”

In a video statement, Ross said store employees called 911 to report a disturbance and trespassing.

When officers arrived, Ross said, staff told them the two men had wanted to use the restroom but were informed it was only for paying customers. The pair repeatedly refused to leave when politely asked to do so by the employees and officers, he said.

“If you think about it logically, that 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. And they did just that,” Ross said.

“They were professional in all their dealings with these gentlemen, and instead they got the opposite back.”

Ross said that as an African-American man he was acutely aware of implicit bias. “We are committed to fair and unbiased policing and anything less than that will not be tolerated in this department,” he said.

Slideshow ( 8 images )

The two men were released, Ross said, after officers learned Starbucks was “no longer interested” in prosecuting them.

In a post on Twitter earlier on Saturday, Starbucks Corp SBUX.O said it was sorry for what took place.

Johnson added his apology, saying the company would review its policies and “further train our partners to better know when police assistance is warranted.”

Melissa DePino, an author who posted video of the arrest, said staff called police because the two men had not ordered anything while waiting for a friend. She said white customers were “wondering why it’s never happened to us when we do the same thing.”

Police departments across the United States have come under criticism for repeated instances of killing unarmed black men in recent years, which activists blame on racial biases in the criminal justice system.