The Prussian Class P8 of the Prussian state railways (DRG Class 38.10-40 of the Deutsche Reichsbahn) was built from 1906 to 1923 by the Berliner Maschinenbau (previously Schwartzkopff) and twelve other German factories. The design was created by Robert Garbe. It was intended as a successor to the Prussian P 6, which was regarded as unsatisfactory.