As the largest state in the German Confederation, Prussia had been involved in the development of the railways since 1838. The first line went from Berlin to Potsdam and was the forerunner of other lines which initially in most cases started from Berlin in the next few years. The linkage of areas with ports or industrial settlements to the steadily growing capital was often of great importance. There were also military purposes such as the construction of a line to the Russian border.
Initially, however, these railways were built and operated exclusively by private companies. In addition, the financial management of the state and its provinces did not allow the state funds, which were scarce at that time anyway, to be invested in railway companies. From 1853 a law came into force that controlled which taxes were levied on company profits. The money thus generated was to be used later to be able to buy up precisely these companies. This also took place on a smaller scale in the following years, but there were major changes only after the founding of the German Empire.
Otto von Bismarck, who himself was Prime Minister of Prussia and now also Reich Chancellor, pursued the idea of merging the railway administrations in the newly founded Reich. This project could not be fully implemented, since the German states, in their sovereign role, did not want to hand over control of their railways to a common imperial institution. Thus, on September 16, 1873, the Reichseisenbahnamt (Imperial Railway Office) was founded, which was intended to ensure cooperation between the state and private railways.
Bismarck himself now took the initiative and began nationalizing the railways in Prussia as the leading state in the Reich. With the now much better financial situation, it was possible between 1880 and 1888 to bring almost all railways in Prussia under control of the state. Despite these circumstances, the individual administrations still had a lot of responsibility and initially continued to build the lines and order vehicles themselves. This was evident, for example, from the close proximity of train stations in Berlin, each of which belonged to a railway line with a different destination. Today, “Königlich Preußische Eisenbahn-Verwaltung” (K.P.E.V., Royal Prussian Railway Administration) is often assumed to refer to all of these railways. In fact, the designation was "Königlich Preußische Staatseisenbahnen" (K.P.St.E., Royal Prussian State Railways), and these were directly part of the Ministry of Public Affairs.
In 1897, the merger with the Grand Ducal Hessian State Railways took place, since the area of Hesse was partly within Prussia and this resulted in many advantages for the company. This resulted in a renaming to "Royal Prussian and Grand Ducal Hessian State Railway" (K.P.u.G.H.St.E.), but the simpler term "Prussian State Railway" (P.St.B.) was finally used. Now the area was so large that by 1912, with a network totaling 39,030 km, more than two-thirds of the railway lines in the entire Reich were in operation.
Due to this huge line network and the already mentioned freedom of the individual divisions, there was a very large variety of locomotive types, several of which still reached a quantity into the thousands. The numbering was also the responsibility of each directorate, so that often the same numbered locomotives could be found at different locations in Prussia.
From 1880 onwards, it was possible to limit the variety somewhat by setting up standard designs. A new designation scheme was set up in 1905 that allowed locomotives with similar characteristics to be grouped together. The designations began with one of the four letters S, P, G and T, which referred to express, passenger, goods and tank locomotives. These were followed by a number indicating the power class. Different types within a class were often marked with a consecutive number, which was either superscripted or separated by a point after the performance number.
It was characteristic of Prussia that many locomotives were procured at the same time in a simple and a compound version. Both versions had advantages and disadvantages, which is why both variants could be purchased, mainly due to the large number for different areas of application.