Let F ∈ C[x, y, s, t] be an irreducible constant-degree polynomial, and let A, B, C, D ⊂ C be finite sets of size n. We show that F vanishes on at most O(n 8/3 ) points of the Cartesian product A × B × C × D, unless F has a special group-related form. A similar statement holds for A, B, C, D of unequal sizes, with a suitably modified bound on the number of zeros. This is a fourdimensional extension of our recent improved analysis of the original Elekes-Szabó theorem in three dimensions. We give three applications: an expansion bound for three-variable real polynomials that do not have a special form, a bound on the number of coplanar quadruples on a space curve that is neither planar nor quartic, and a bound on the number of four-point circles on a plane curve that has degree at least five.