A relay building-block for mounting on a rail has a flat two-part plastic housing with ribs forming chambers into which relay elements can be laid. These elements also include the terminals. There is a device 23-27 for snapping the housing onto the rail. The ribs have recesses into which another housing part can clip. The recesses are slits and/or round holes. The ribs of one part also have recesses for connection between the terminals and the relay elements themselves.