On Pillay's conjecture in the general case