OAKLAND, Calif. — Apple said it would close most of its retail stores outside mainland China, Hong Kong and Taiwan, becoming one of the first companies to take such a drastic measure to fight the coronavirus outbreak.

The move signaled that retailers might be the next part of society to shut their doors.

Apple is closing more than 450 stores across 21 countries until March 27. “The most effective way to minimize risk of the virus’s transmission is to reduce density and maximize social distance,” Timothy D. Cook, the company’s chief executive, said in a statement posted on Friday to the company’s website.

Apple said employees at its closed stores would be paid as normal.

Apple’s move was a stark example of how the epicenter of the virus has now spread well beyond China.