Spain's national statistics agency, Instituto Nacional de Estadística, has started using the location data of millions of mobile phone users to track their movements for several days in preparation for the next census, raising privacy concerns.

The unprecedented operation is being carried out in cooperation with Spain's three biggest mobile operators - Movistar, Orange and Vodafone - which account for 78.7% of all cell phones in use in the country.

INE will analyse users' movements between 18 and 21 November, 24 November and 25 December and on two days next summer - 20 July and 15 August - which is a public holiday.

On those dates INE will receive information regarding the location of mobile phones at different times of the day.

INE said the information will allow it to better prepare its next census of the population in 2021, and get a more accurate picture of people's whereabouts during the day and their place of residence at night than it gets from traditional means such as mailing out questionnaires.

People may be officially registered as living in a town when in fact they live elsewhere, but mobile location data shows where they really are.

Governments rely on accurate population data in order to allot adequate funds for public services such as transportation and health care.

The part of the study carried out on Christmas Day and over the summer is meant to detect where people spend their vacations or how many families get together for the holidays.

INE will pay the three mobile operators nearly €500,000 for the data, a spokesman for the agency said.

It promises that all the data it receives from the operators will be scrubbed of any personally identifiable information and instead be "completely anonymous".

"INE will never have any sort of individual information," the INE spokesman said.

Despite such reassurances, the project has raised alarm bells.

Spanish newspapers and TV stations have said people can prevent their location data from being shared with INE.

"We are in favour of using statistics, but not the use of people like guinea pigs without their knowledge and without having given their consent," Simona Levi, the founder of cyber activist collective Xnet, said  in a statement.