More than one million undocumented migrants in Spain have sought legal status under a scheme that has defied a wider European crackdown on irregular immigration, the government said on Tuesday, the final day for submissions. The vast scheme was predicted to benefit around 500,000 people, most from Latin America, when the left-wing government launched it in April. Read moreSpain launches programme to offer amnesty to 500,000 undocumented migrants "The more than one million applications submitted... show how necessary this recognition of rights and responsibilities was," Socialist Prime Minister Pedro Sanchez told an event in Madrid. Sanchez has become a standard bearer of more open immigration policies as his European neighbours – including some Socialist peers – toughen measures in response to pressure from ascendant far-right parties. He has long argued that immigrants are needed to sustain the economy, the welfare state and pensions amid Spain's ageing population and depopulation in rural regions. The number of applications submitted does not necessarily indicate how many migrants will secure their legal status. Applicants must prove they have a clean criminal record and spent at least five consecutive months in Spain before January 1. The authorities have three months to process their paperwork and decide whether to issue a work and residence permit only valid in Spain. "When we condemn a person to invisibility, I think we make our country a worse country. We all lose," Sanchez explained, saying his government aimed to "offer an opportunity and future" to migrants. "We want the world to view Spain as a country that respects, protects and upholds human rights." Economic boost For Juana Hernandez, a 59-year-old Cuban who has lived in Spain for two and a half years and whose application was recently approved, the plan "is a huge opportunity". She told AFP she had paid a lawyer roughly €200 ($225) to handle the administrative formalities "to be on the safe side", as well as receiving help from a migrant aid association. Although she was "a little worried" at the start, the English degree holder now aims to work at Madrid airport.