We explore a novel approach to compute the force between a static quark and a static antiquark with lattice gauge theory directly. The approach is based on expectation values of Wilson loops or Polyakov loops with chromoelectric field insertions. We discuss theoretical and technical aspects in detail, in particular, how to compensate large discretization errors with a multiplicative renormalization factor and the evaluation using a multilevel algorithm. We also compare numerical results for the static force to corresponding results obtained in the traditional way, i.e., by computing first the static potential and then taking the derivative.