An extension of the Steinhaus-Weil theorem