A qanat or kārīz is a system for transporting water from an aquifer or water well to the surface, through an underground aqueduct; the system originated approximately 3,000 years ago in what is now Iran. The function is essentially the same across North Africa and the Middle East but the system operates under a variety of regional names: qanat or kārīz in Iran, foggara in Algeria, khettara in Morocco, falaj in Oman and the United Arab Emirates, karez in Afghanistan and Pakistan, uyūn in Saudi Arabia, etc. The largest extant and functional qanat systems are located in Iran, Afghanistan, Oman, the oases of Turfan region of China, Algeria, and Pakistan.