Let X be a smooth algebraic variety over a field K containing the real numbers. We introduce the notion of twisted associative (resp. Poisson) deformation of the structure sheaf O X . These are stack-like versions of usual deformations. We prove that there is a twisted quantization operation from twisted Poisson deformations to twisted associative deformations, which is canonical and bijective on gauge equivalence classes. This result extends work of Kontsevich, and our own earlier work, on deformation quantization of algebraic varieties.