There were four main marks of the Martini–Henry rifle produced: Mark I (released in June 1871), Mark II, Mark III, and Mark IV. There was also an 1877 carbine version with variations that included a Garrison Artillery Carbine, an Artillery Carbine (Mark I, Mark II, and Mark III), and smaller versions designed as training rifles for military cadets. The Mark IV Martini–Henry rifle ended production in 1889, replaced by the Lee–Metford, but it remained in service throughout the British Empire until the end of the First World War.