This work considers a mathematical model that describes quasistatic evolution of an elastic 2D bar that may come in frictional contact with a deformable foundation. We present the model and some of its underlying assumptions. In particular, the novelty in the model is that both vertical and horizontal motions are taken into account, which makes it especially useful when frictional contact is concerned. Contact is described with the normal compliance condition and friction with the Coulomb law of dry friction. We introduce a hybrid variational formulation of the problem and a numerical discretization based on a uniform time step and the finite element method in space. The numerical algorithm has been implemented, and we present computer simulations that illustrate the mechanical behavior of the system with emphasis on frictional aspects of the problem.