The Spanish government plans to regularize around 900,000 undocumented migrants over the next three years. In addition, residence and work permits will be granted to approximately 25,000 migrants affected by the floods in Valencia.