A rigorous convergence theory for Galerkin methods for a model Helmholtz problem in
R
d
{\mathbb {R}}^{d}
,
d
∈
{
1
,
2
,
3
}
d \in \{1,2,3\}
is presented. General conditions on the approximation properties of the approximation space are stated that ensure quasi-optimality of the method. As an application of the general theory, a full error analysis of the classical
h
p
hp
-version of the finite element method (
h
p
hp
-FEM) is presented for the model problem where the dependence on the mesh width
h
h
, the approximation order
p
p
, and the wave number
k
k
is given explicitly. In particular, it is shown that quasi-optimality is obtained under the conditions that
k
h
/
p
kh/p
is sufficiently small and the polynomial degree
p
p
is at least
O
(
log
k
)
O(\log k)
.