We obtain a sufficient condition for boundary regularity of quasiminimizers of the p-energy integral in terms of a Wiener type sum. The exponent in the sum is independent of the dimension and is explicitly expressed in terms of p and the quasiminimizing constant. We also show by an example that the exponent is sharp in a certain sense.