For a set of N asymptotically flat black holes with arbitrary charges and masses, all initially at rest and well separated, we prove the following extremum principle: the extremal charge configuration (|qi| = mi for each black hole) can be derived by extremizing the total energy, for variations of the black hole apparent horizon areas, at fixed charges and fixed Euclidean separations. We prove this result through second order in an expansion in the inverse separations. If all charges have the same sign, this result is a variational principle that reinterprets the static equilibrium of the Majumdar-Papapetrou-Hartle-Hawking solution as an extremum of total energy, rather than as a balance of forces; this result augments a list of related variational principles for other static black holes, and is consistent with the independently known Bogomol'nyi-Prasad-Sommerfield (BPS) energy minimum.