<p>The solenoid valve according to the invention has a magnet housing (10) on which a valve-closing element (20) is mounted. This valve-closing element is designed as a injection die-casting, the control edges (33 and 35) interacting with the valve spool (37) being formed by pocket-like recesses (29, 31). These recesses are formed by means of shaped parts during the production of the injection die-cast blank. This eliminates an involved and expensive turning operation to produce control grooves on the circumference of the longitudinal bore (21). <IMAGE></p>