We prove a Bonnet-Myers type theorem for quaternionic contact manifolds of dimension bigger than 7. If the manifold is complete with respect to the natural sub-Riemannian distance and satisfies a natural Ricci-type bound expressed in terms of derivatives up to the third order of the fundamental tensors, then the manifold is compact and we give a sharp bound on its sub-Riemannian diameter.for some (and then any) set X 1 , . . . , X k ∈ Γ(D) of local generators for D.Given a sub-Riemannian structure on M , the sub-Riemannian distance is defined by:d SR (x, y) = inf{ℓ(γ) | γ(0) = x, γ(T ) = y, γ horizontal}.