A C-metric type solution for general relativity with cosmological constant is presented in 2+1 dimensions. It is interpreted as a three-dimensional black hole accelerated by a strut. Positive values of the cosmological constant are admissible too. Some embeddings of this metric in the 3+1 space-time are considered: accelerating BTZ black string and a black ring where the gravitational force is sustained by the acceleration.