The class XXI was one of the few locomotives that were specially procured for the Grand Duchy of Mecklenburg Friedrich-Franz-Eisenbahn. It arose from the fact that a tank locomotive like the Prussian T 9 was needed for branch lines, but the axle load was too high. Therefore, as the developer of the T 9, Henschel was commissioned to build a similar locomotive with an axle load of only twelve tonnes. The resulting XXI shared the same 2-6-0T axle formula and similar visual appearance, but was lighter and had smaller supplies. From 1910 it was given the designation T 4.
Between 1907 and 1922, Henschel and Orenstein & Koppel delivered 50 engines in slightly different designs to Mecklenburg, which became the class 9119 at the Reichsbahn. In addition, there were six more in 1919 and 1920 for the light railways in the province of Saxony, which later became the class 9164. Depending on the year of construction and design, the locomotives had axle loads of between 11.8 and 14 tonnes with different amounts of coal and water. The driving wheels were either 1,150 or 1,200 mm in diameter and allowed a top speed of 45 or 50 km/h. Despite the lighter construction compared to the T 9, the indicated power could remain at the same level due to advances in technology.
The Reichsbahn took over all 50 Mecklenburg machines and later also those of the private railways after they had been nationalized. After the war only four locomotives came to the Bundesbahn, where they were retired by 1950. Two more were in Poland and were used there as TKi 100. The remaining 32 were all left in the East Zone. Half of them had to be handed over to the Soviet Union as reparations, where they were given the designation TT. The remaining half was used by the Reichsbahn together with the former private railway locomotives and retired by 1970.