  It is shown in math.QA/0301027 that a finite dimensional quasi-Hopf algebra
with radical of codimension 1 is semisimple and 1-dimensional. On the other
hand, there exist quasi-Hopf (in fact, Hopf) algebras, whose radical has
codimension 2. Namely, it is known that these are exactly the Nichols Hopf
algebras H_{2^n} of dimension 2^n, n\ge 1 (one for each value of n). The main
result of this paper is that if H is a finite dimensional quasi-Hopf algebra
over C with radical of codimension 2, then H is twist equivalent to a Nichols
Hopf algebra H_{2^n}, n\ge 1, or to a lifting of one of the four special
quasi-Hopf algebras H(2), H_+(8), H_-(8), H(32) of dimensions 2, 8, 8, and 32,
defined in Section 3. As a corollary we obtain that any finite tensor category
which has two invertible objects and no other simple object is equivalent to
\Rep(H_{2^n}) for a unique n\ge 1, or to a deformation of the representation
category of H(2), H_+(8), H_-(8), or H(32). As another corollary we prove that
any nonsemisimple quasi-Hopf algebra of dimension 4 is twist equivalent to H_4.
