SEOUL, South Korea — The number of people who have died of Middle East respiratory syndrome in South Korea increased to four on Friday after officials confirmed two more deaths in what has become the largest outbreak of the virus outside the Middle East.

As fear spread, the government of President Park Geun-hye was accused of not doing enough to contain the outbreak and of endangering the public by withholding information about it.

At a news conference on Thursday, the influential mayor of Seoul, Park Won-soon, castigated the national authorities for not disclosing that a doctor at a Seoul hospital who was quarantined on Sunday with symptoms of the syndrome, known as MERS, had attended a gathering of more than 1,500 people in the southern part of the city only the day before.

More than 1,160 schools and kindergartens in South Korea have been shut down temporarily, and many Koreans are wearing surgical masks in public.