Serial shift operations in scan-based testing impose elevated levels ofpower dissipation, endangering the reliability of the chip being tested. Scan chain partitioning techniques are quite effective in reducing test power, as the rippling in the clock network, in the scan chains, and in the combination logic is reduced altogether Partitioning approaches implemented in a static manner may fail to reduce peak power down to the desired level, however, depending on the transition distribution of the problematic pattern in the statically constructed scan chain partitions. In this paper, we propose a dynamic partitioning approach capable of adapting to the transition distribution of any test pattern, and thus of delivering near-perfect peak power reductions. Weformulate the scan chain partitioningproblem via Integer Linear Programming (ILP) and also propose an efficient greedy heuristic. The proposedpartitioning hardware allowsfor the partitioning reconfiguration on a per test pattern basis, enabling the dynamic partitioning. Significant peakpower reductionsare thus attained cost-effectively.