Cusco, Peru (CNN) -- Authorities in Peru have rescued the last of hundreds of travelers who had been stranded by flooding in a town near one of South America's most popular tourist destinations, a government official said Friday.



Tourism Minister Martin Perez said 1,460 tourists were evacuated from Aguas Calientes, bringing the total rescued during the past three days to 4,005 -- 3,500 of them tourists.



Thirteen helicopters in 268 flights took them to the city of Cusco, though one group of Colombians indicated they had not wanted to leave, he said.



Days of heavy rain had triggered flash floods and landslides around Machu Picchu, the ruins of an Incan settlement in southern Peru's Andes Mountains.



The floods closed roads, bridges and rail lines, stranding tourists from around the world in the small town closest to the ruins. They also killed at least seven people, including an Argentine tourist, according to news reports.



The tourists became stranded after a landslide early in the week blocked a rail line to Cusco, the nearest major city, said Martin Perez, Peru's minister of foreign trade and tourism, according to the state-run Andina news agency.



Peruvian authorities said they have given priority to children, the elderly and the ill, regardless of their nationality.



Authorities estimated that 10,000 people were affected by the rain and 2,000 homes were ruined in and around Machu Picchu.



The Peruvian government declared a state of emergency in two regions around Machu Picchu -- Cusco and Apurimac.



The floods have damaged thousands of acres of crop land, washed out about a dozen bridges and damaged several highways.



Don Jacinto, whose parents and grandparents lived in one affected area, said his relatives could not recall the rivers ever raging so strongly.



Machu Picchu is an ancient city on a mountain in the Andes, standing 8,000 feet (2,430 meters) above sea level in a tropical mountain forest.



Known as the "Lost City of the Incas," Machu Picchu attracts tens of thousands of international tourists every year.



CNN's Maria Elena Belaunde in Cusco and journalist Claudia Cisneros in Lima contributed to this report.
What triggered the flash floods and landslides? Where did the weather events happen? What happened to the tourists?
Days of heavy rain Peru became stranded after a landslide
question: What triggered the flash floods and landslides?, answer: Days of heavy rain | question: Where did the weather events happen?, answer: Peru | question: What happened to the tourists?, answer: became stranded after a landslide