The Prussian G 12 is a 1'E 2-10-0 goods train locomotive built for the Prussian state railways (Preußische Staatseisenbahnen). 

It had been shown during the First World War that, from a servicing and maintenance point of view, it was a great disadvantage for each state railway to have its own locomotive classes with no standardization. Even spare parts for locos of the same class often did not fit their sister locos. In addition, the military railways needed a fast, powerful, goods locomotive that did not have a high axle load.

Einheitslokomotive G 12 

In the advertisements placed by locomotive factories, G 12 engines were described as Einheitslokomotiven (standard locomotives). That caused a lot of confusion, because the term Einheitslokomotive had become synonymous with the Einheitslokomotive 1925, designed in that year by the DRG („Kunibald“ Wagner). The Deutsche Bundesbahn (DB) also called its steam locomotives Einheitslokomotive 1950 according to DV 939a "steam locomotives and tenders (standard gauge)" from 1953, and its AC electric locomotives E10, E11, E40, E42, E50 and E51 were designated as Einheits(elektro)lokomotiven.

The standardisation of locomotives began in Prussia in the 19th century with 'norms' (Normalien). Those designed by Robert Garbe used many common parts, as the P8, G10 (common boiler) and T18 (also same boiler apart from Smokebox). The Prussian G 8.3 is a shortened G 12, the Prussian G 8.2 eliminated the inner cylinder.

The G 12 was the first locomotive commonly in service with multiple German state railways and thus rightly carries the name Einheitslokomotive, apart from "Kunibald" Wagner continuing the tradition of Garbe, and, later, handing the torch over to Friedrich Witte of the DB and Max Baumberg of the Deutsche Reichsbahn (DB). However, it is a distinct machine from the Einheitslokomotive 1925 of the DRG.

In the 1920s, continuing well-constructed types (like the Bavarian S 3/6, Saxon XX HV, Prussian P 8 and others, including G 82 and G 12), came under serious consideration. Wagner prevailed by stating that none of those machines offered the crucial standardisation of parts needed for economic operation. The G 12/G 82 was also not used as template or first classes of the Einheitslokomotive 1925. Instead, the Einheitslok-1925 was a complete redesign, its genesis being described in detail by Alfred Gottwaldt, Geschichte der deutschen Einheits-Lokomotiven Franckh, Stuttgart 1978, .

Design
The G 12 was based on the Prussian G 12.1 and a 2-10-0 locomotive built for the Chemins de fer Ottomans d'Anatolie (CFOA) of the Ottoman Empire by Henschel (see Prussian G 12 (CFOA type).

After Robert Garbe retired, the locomotives deviated in several ways from earlier principles for Prussian locomotive design. For example, they had a continuous bar frame and a wide, outer, Belpaire firebox, located above the frame with a large grate area. The same principles were applied to other, later,  designs such as the Prussian T 20 or Prussian P 10.

Construction
Between August 1917 and 1921, a total of 1,168 G 12s were procured by Prussia. The Imperial Railways in Alsace-Lorraine ordered 118, the Grand Duchy of Baden State Railway 88, the Royal Saxon State Railways 42 and the Royal Württemberg State Railways 42. In addition, Baden bought 10 locomotives from the Prussian state railways. Even the Deutsche Reichsbahn received a batch of 20 locomotives in 1924 that, following the Saxon XIII H, were given the numbers 58 443-462.

The Saxon locomotives were, like their predecessors, designated as Class XIII H; Baden and Württemberg took on the Prussian designation of G 12. Only the Bavarian State Railways, the railways of Mecklenburg and Oldenburg did not buy any G 12s. As a result, the G 12 can be viewed as the precursor to the standard locomotives or Einheitsloks of Germany.

Deutsche Reichsbahn
The majority of locomotives of this class were taken over by the Deutsche Reichsbahn. There they were given the following operating numbers:
Baden G 12:  58 201–225, 231–272, 281–303, 311–318
Saxon XIII H: 58 401–462
Württemberg G 12: 58 501–543
Prussian G 12: 58 1002–2148. 
Number 58 1001 was not a G 12, rather an engine for the CFOA left in Germany.

Coal dust firing
Around 1930, six engines were converted to coal dust firing and, after 1945, a number of other engines were similarly modified, of which 43 remained in service for a long time (up to 1968).

World War II and beyond

In World War II, 58 2144 from Poland and 58 2145-2148 from Luxembourg were incorporated.

The Deutsche Bundesbahn retired their units in 1953. The East German Deutsche Reichsbahn still had 300 machines in service in 1968. On the introduction of EDP numbers in 1970, a '1' was usually prefixed to three-digit operating numbers. The last locomotives were retired in 1976. 56 locomotives were converted by the Deutsche Reichsbahn to Class 58.30 Rekoloks between 1958 and 1962. 

After World War II, locomotives 58 1669, 1746, 1767, 1904, 1917, 2122 and 2132 remained in Austrian national territory. Number 58 1669 was given back to the DB in 1949, 58 1904 was paid off in 1951 and 58 1917 ended up in the Soviet Union in 1949. The remaining four engines formed the Austrian ÖBB Class 658. All the engines had been retired by 1966. However, at least two examples (658.1746) and (658.2122) survived longer as heating locomotives at Linz depot. 658.1746 was seen dumped as 01033 in August 1972, along with 658.2122 as 01042. 01042 survived until at least February 1976.

The locomotives remaining in Poland after 1945 were given the Polish State Railways class Ty1. Those in Yugoslavia became class 36.

Tenders

The G 12 was mainly equipped with Prussian class 3 T 20 or 2'2' T 31.5 tenders. The Saxon XIII H, on the other hand, generally ran with the somewhat larger Saxon class 3 T 21 tenders, resulting in a greater overall length. Because the volume of the water tank was reduced when locomotives were converted to coal dust firing, only large Prussian 2'2' T 31.5 tenders or standard tenders were used after the war.

Preservation
As of the time of writing, two former Baden locomotives of the older type, 58 261 (Bw Chemnitz-Hilbersdorf) and 58 311 (Ettlingen), a Prussian original, 58 1616 (formerly used as a steam generator (Dampfspender) (Bw Hermeskeil) and an example obtained by Yugoslavia after WW2, 36-013, notably with the rear steam dome removed (Železniški Muzej Ljubljana), remain preserved.

See also 

 Prussian state railways
 List of Prussian locomotives and railcars

References 
 
 
 
 
 

G 12
1′E h3 locomotives
Freight locomotives
Railway locomotives introduced in 1917
2-10-0 locomotives
Standard gauge locomotives of Germany
Standard gauge locomotives of Austria
Standard gauge locomotives of Poland
Standard gauge locomotives of France
Standard gauge locomotives of Yugoslavia
Henschel locomotives
Borsig locomotives
Linke-Hofmann locomotives
Hanomag locomotives
AEG locomotives
Krupp locomotives
SACM locomotives
Maschinenbau-Gesellschaft Karlsruhe locomotives
Esslingen locomotives
Sächsische Maschinenfabrik locomotives
Brown, Boveri & Cie locomotives
Schichau-Werke locomotives