Residents of Spain who refuse to be vaccinated will be put on a list to be shared with other European Union countries, its health minister said Tuesday.

Minister, Salvador Illa said vaccinations were compulsory but the government will move ahead with a plan to create a registry of residents who refuse to be vaccinated. This will apply to all those called for vaccinations by the country's public health service.

"Vaccination refusals will be kept in a register. This is not a public document and it will be done with the highest respect of data privacy," Illa said during a televised interview.

Illa said the registry won't be shared with agencies only such as those in the transport sector. Officials said vaccinations were the best way to "defeat the virus" and the country will have a better chance of success if more people agree to get vaccinated.

Illa said people should consider vaccinations as a way to protect loved ones and as an "act of solidarity."

The country launched its vaccination program Monday. Spain aims to vaccinate at least 2.5 million people between now and March. The government is prioritizing health care workers and other front line personnel such as nursing home residents and hospital doctors.

On Monday, the mayor of Madrid and the spokesman of the Popular Party opposition José Luis Martínez-Almeida said that the government had failed to provide "transparent" information about its program.

In an interview with Spanish national radio, Martínez-Almeida said the government should be transparent with its plans and not use it as "propaganda." He said the government's "shortage of information" is the main cause for the hesitation to get vaccinated.