The group testing problem consists of determining a sparse subset of a set of items that are “defective” based on a set of possibly noisy tests, and arises in areas such as medical testing, fault detection, communication protocols, pattern matching, and database systems. We study the fundamental limits of any group testing procedure regardless of its computational complexity. In the noiseless case with the number of defective items k scaling with the total number of items p as O(pθ ) (θ ∈ (0, 1)), we show that the probability of reconstruction error tends to one when n ≤ k log2 p k (1 + o(1)), but vanishes when n ≥ c(θ)k log2 p k (1 + o(1)), for some explicit constant c(θ). For θ ≤ 1 3 , we show that c(θ) = 1, thus providing an exact threshold on the required number measurements, i.e. a phase transition, which was previously known only in the limit as θ → 0. Analogous necessary and sufficient conditions are derived for the noisy setting, and also for a relaxed par...