Starbucks said on Tuesday that it would close its more than 8,000 stores in the United States for one day to conduct anti-bias training after two African-American men were arrested at one of its stores last week, prompting outrage.

Starbucks will close the stores May 29 to offer the training to 175,000 employees.

“I’ve spent the last few days in Philadelphia with my leadership team listening to the community, learning what we did wrong and the steps we need to take to fix it,” Kevin R. Johnson, the company’s chief executive, said in a statement announcing the training.

The two men were arrested after asking to use the restroom at a Starbucks in Philadelphia. An employee refused the request because the men had not bought anything, according to officials. The men sat down and were asked to leave, and an employee eventually called the police.

The ensuing scene was recorded in a video that has been viewed more than 10 million times on Twitter. In it, police officers appear to handcuff both men, as a third man, Andrew Yaffe, confronts them.