The Heckler & Koch company began to develop a new selfloading pistol with compact size and enhanced safety features in about 1971. After several years of prototyping and experiments, HK finally brought out the PSP (Polizei Selbstlade-Pistole in German, or Police Selfloading Pistol) in 1976. It was intended for a West German Police, and consequently the PSP had been adopted by several police departments, as well as Border police units as a P7. Mass production of PSP started in 1979. By the 1981 Heckler - Koch company brought up an updated version of the P7, the P7M8. P7M8 featured a magazine release, relocated from the heel of the grip to the base of the triggerguard ("American" style instead of "European" style), as well as enlarged triggerguard and a heat shield inside the triggerguard, to protect the trigger finger from hot part of the frame, which contained the retarding gas cylinder. The P7M8 was adopted by the New Jersey State Police (USA) and is still in use there. Next version was the P7M13, a high capacity derivative of P7M8, which accepted double stack magazines with 13 rounds, instead of earlier 8 rounds single stack magazines, used in P7 and P7M8. P7M13 was introduced in 1982. Last production variant of the P7 breed is the P7M10, a high capacity version chambered for more powerful .40SW cartridges, which appeared in 1991. The experimental P7M7 pistol, chambered for powerful .45ACP ammunition, with gas retarded system replaced by the artillery-like liquid oil recoil retarder, never make past prototype stages, because of excessive costs and complexity of the system.

The licensed copy of the P7M8 in 9mm is in production in Greece, as the EP7 pistol. The EP7 is a standard sidearm to the Greece military and police forces.

The P7 pistols are known for their low barrel axis and slim profile, which makes them an accurate and easily concealable pistols (latter is less related to the bulkier P7M10). They also are somewhat expensive, but have a strong following among many shooters.

P7 pistols are built around gas retarded blowback system, based on WW2-era Barnitzke system. In this system some of the powder gases are directed from the barrel, via the small port near to the chamber, into the gas cylinder under the barrel, where the pressure acts against the gas piston, attached to the slide, thus slowing down the slide opening until the pressure in the barrel drops down to safe level. This system accounts for stationary and low mounted barrel, which helps to maintain compact size of the gun and great accuracy. On the other hand, such systems are somewhat sensitive to bullet types and powder types, and require more complicated and frequent cleaning than most recoil-operated guns of the same class. Other interesting feature of the P7 pistol is its trigger system. The P7 uses a striker fired mechanism, which is cocked for the first shot by depressing the large cocking lever at the front of the grip; for all subsequent shots, striker is cocked automatically as slide recoils. As soon as the grip and the cocking lever are released, the striker decocks automatically. Because of this, P7 has no manual safeties and designed to be safely carried with round in chamber. To open the fire, one must just grip the gun securely and release the trigger.

P7 is an all-steel design. Early P7 / PSP pistols featured a magazine release in the heel of the grip. With the introduction of the P7M8, all P7 type pistols featured the magazine release button at the base of the triggerguard, as well as enlarged triggerguard and heat shield above the trigger. P7 and P7M8 pistols had a single stack, 8 rounds magazines; P7M13 and P7M10 pistols had a double-stack magazines which hold 13 rounds of 9mm and 10 rounds of .40SW ammunition respectively.