A new technique is presented to design energy-efficient large-scale tracking systems based on mobile clustering. The new technique optimizes the formation of mobile clusters to minimize energy consumption in large-scale tracking systems. This technique can be used in large public gatherings with high crowd density and continuous mobility. Utilizing both Bluetooth and Wi-Fi technologies in smart phones, the technique tracks the movement of individuals in a large crowd within a specific area, and monitors their current locations and health conditions. The new system has several advantages, including good positioning accuracy, low energy consumption, short transmission delay, and low signal interference. Two types of interference are reduced: between Bluetooth and Wi-Fi signals, and between different Bluetooth signals. An integer linear programming model is developed to optimize the construction of clusters. In addition, a simulation model is constructed and used to test the new technique under different conditions. The proposed clustering technique shows superior performance according to several evaluation criteria.