The Walter concern of German designed and developed the "Pistole 38" ("P38") semi-automatic pistol as a direct replacement for the famous Pistole Parabellum 1908 - better known as the "Luger" or "P08" model. An excellent weapon for its time (it first appeared in 1904 with the German Navy), the sidearm was still a turn-of-the-century design at its core, lacking some of the newer features being encountered with handguns of the interwar period, and not wholly designed for expedient, lower-cost serial production. With the emergence of the Nazi Party in the early 1930s, and a rearming of the German ground military, though was given to adopting a modern service pistol to go along with the revitalized German soldier.
The Walther concern was founded back in 1886 and went on to develop a line of useful pistols in the run-up to World War 2 (1939-1945). Developments generally centered around concealable pocket designs which found favor with various markets around the world. Using this knowledgebase, Walther set to work on a pistol designed from the outset as a military sidearm, built for the rigors of battlefield abuse, with construction and assembly methods more suitable for mass production.
Walther's police-minded designs then evolved to become the Walther AP ("Armee Pistole") of 1936. This weapon sported a locked breech arrangement and featured a concealed hammer to prevent snagging. It was chambered in 9x19mm Parabellum, the standard German pistol cartridge, and fired from an 8-round detachable box magazine inserted into the base of the pistol grip. A short-recoil action was used and a iron sights allowed for the necessary training of the gun at range. The P38 was a Double-Action ("DA"), semi-automatic service pistol with ribbed plastic grips and a cut-out slide design - wholly unique in the grand scope of World War 2 service pistols where many mimicked the famous lines of the Browning M1911.
While only a few of the AP-models were manufactured, it was this design that was passed to the German Army for testing. While evaluations were underway, Walther offered the weapon to the civilian market as the Walther HP ("Heeres Pistole"). The Germany Army then came back and requested an external hammer be fitted as soldiers appreciated the quick recognition of the hammer status. Additional review eventually led to the gun's formal adoption in 1938 as the "Pistole 38" or "P38". 1939 also saw an order come in from the Swedish Army who looked to make the P38 their next standard service pistol as well.