In this paper, we apply the variational multiscale method with subgrid scales on the element boundaries to the problem of solving the Helmholtz equation with low-order finite elements. The expression for the subscales is obtained by imposing the continuity of fluxes across the interelement boundaries. The stabilization parameter is determined by performing a dispersion analysis, yielding the optimal values for the different discretizations and finite element mesh configurations. The performance of the method is compared with that of the standard Galerkin method and the classical Galerkin least-squares method with very satisfactory results. Some numerical examples illustrate the behavior of the method. Copyright © 2012 John Wiley & Sons, Ltd.