Crowd management is a considerable challenge in many countries including Saudi Arabia, where millions of pilgrims from all over the world visit Mecca to perform the sacred act of Hajj. This holy ritual requires large crowds to perform the same activities during specific times, which makes crowd management both critical and difficult. Without proper crowd management and control, the occurrence of disasters such as stampedes, suffocation, and congestion becomes highly probable. At present, the internet of things (IoT) and its enabling technologies represent efficient solutions for managing and controlling crowd, minimizing casualties, and integrating different intelligent technologies. Moreover, IoT allows intensive interaction and heterogeneous communication among different devices over the internet, thereby generating big data. This paper proposes an intelligent IoT approach for crowd management with congestion avoidance in the Mina area, which is located in the holy city of Mecca. The approach implements a learning mechanism that classifies pilgrims based on the collected data and exploits the advantages of both IoT and cloud infrastructures to monitor crowds within a congested area, identify evacuation paths for pilgrims and guide the pilgrims to avoid congestion in real time. Moreover, the approach attempts to maximize crowd safety based on realistic scenarios by controlling and adapting pilgrim movements according to the characteristics of the possible hazards, pilgrim behavior, and environmental conditions. We evaluated our proposed approach by performing simulations based on real data sets and scenarios.INDEX TERMS Big Data, cloud computing, classified evacuation, intelligent crowd management, IoT.