MILAN—Part of Italy’s economic heartland woke up under a quarantine on Sunday with more than 50,000 people not allowed to leave their towns, as the country began to grapple with the worst coronavirus outbreak outside of Asia.

The first economic effects hit Milan, the engine of Italy’s economy, which is just 40 miles from the outbreak’s epicenter. Trade shows, soccer matches and other public events were canceled. The mayor of Milan, Italy’s second-largest city with about 1.4 million residents, said the city’s schools will would be closed for a week.

As of Sunday evening, more than 150 people in Italy had tested positive for the virus, with about 115 of them in Lombardy, the region where Milan is the capital. Three people have died, including two in Lombardy. The number of infected rose throughout the day on Sunday.

Health officials struggled to explain how in just a few days Italy went from having just three cases, two of them Chinese tourists, to becoming by far Europe’s biggest outbreak. Italian authorities are trying to reconstruct how the outbreak started, a key step needed to track down all people who might be infected without yet showing symptoms.

One focus is an emergency room in a hospital in Codogno, the town south of Milan at the center of the outbreak. Codogno and nine other nearby towns in Lombardy were put under quarantine on Saturday. Italian Prime Minister Giuseppe Conte didn’t say how long the quarantine would last.