An optimal control problem of the obstacle for an elliptic variational inequality is considered, in which the obstacle is regarded as the control. To get the regularity of the optimal pair, a new related control problem is introduced. By proving the existence of an optimal pair to such a new control problem, the regularity of the optimal pair to the original problem is obtained. It turns out that the regularity obtained is sharp in general. Some other interesting properties of the optimal pair are also established. (C) 2001 Academic Press.