The geometric Satake equivalence of Ginzburg and Mirković- Vilonen, for a complex reductive group G G , is a realization of the tensor category of representations of its Langlands dual group L G {}^L G as a category of “spherical” perverse sheaves on the affine grassmannian Gr G = G ( C ( ( t ) ) / G ( C [ [ t ] ] ) \operatorname {Gr}_G = G(\mathbb {C}(\mspace {-3.5mu}(t)\mspace {-3.5mu})/G(\mathbb {C}[\mspace {-2mu}[t]\mspace {-2mu}]) . Since its original statement it has been generalized in two directions: first, by Gaitsgory, to the Beilinson–Drinfeld or factorizable grassmannian, which for a smooth complex curve X X is a collection of spaces over the powers X n X^n whose general fiber is isomorphic to Gr G n \operatorname {Gr}_G^n but with the factors “fusing” as they approach points with equal coordinates, allowing a more natural description of the structures and properties even of the Mirković–Vilonen equivalence. The second generalization, due recently to Finkelberg–Lysenko, considers perverse sheaves twisted in a suitable sense by a root of unity, and obtains the category of representations of a group other than the Langlands dual. This latter result can be considered as part of “Langlands duality for quantum groups”. In this work we obtain a result simultaneously generalizing all of the above. We consider the general notion of twisting by a gerbe and define the natural class of “factorizable” gerbes by which one can twist in the context of the Satake equivalence. These gerbes are almost entirely described by the quadratic forms on the weight lattice of G G . We show that a suitable formalism exists such that the methods of Mirković–Vilonen can be applied directly in this general context virtually without change and obtain a Satake equivalence for twisted perverse sheaves. In addition, we present new proofs of the properties of their structure as an abelian tensor category.