ADEJE, Spain — The Spanish authorities scrambled on Tuesday to trace everyone who had contact with an Italian doctor and his partner who tested positive for the coronavirus while on vacation in the Canary Islands, locking down a major resort with hundreds of guests in the hopes of limiting any possible outbreak.

While officials said they were acting out of an abundance of caution, the response underscored how quickly the spread of the virus in one European Union nation could become a problem for others in the bloc, which prides itself on frictionless travel across borders.

The doctor had been visiting from the Lombardy region of Italy, officials said, which has been hard hit by the virus. Cases that appear connected to Lombardy were also reported on Tuesday in France, Austria, Croatia and Switzerland.

The resort, the H10 Costa Adeje Palace on the island of Tenerife, was not placed under quarantine, which involves separation of those who have been exposed to the virus, the authorities said. Rather, they said, it was in lockdown for now, which aims to halt the movement of all individuals within the concerned area — regardless of whether they are sick or have been exposed.