An inverse of Bell's theorem