Pathogenic bacteria and mutualistic rhizobia are able to invade and establish chronic infections within their host plants. The success of these plant–bacteria interactions requires evasion of the plant innate immunity by either avoiding recognition or by suppressing host defences. The primary plant innate immunity is triggered upon recognition of common microbe-associated molecular patterns. Different studies reveal striking similarities between the molecular bases underlying the perception of rhizobial nodulation factors and microbe-associated molecular patterns from plant pathogens. However, in contrast to general elicitors, nodulation factors can control plant defences when recognized by their cognate legumes. Nevertheless, in response to rhizobial infection, legumes show transient or local defence-like responses suggesting that Rhizobium is perceived as an intruder although the plant immunity is controlled. Whether these responses are involved in limiting the number of infections or whether they are required for the progression of the interaction is not yet clear. Further similarities in both plant–pathogen and Rhizobium–legume associations are factors such as surface polysaccharides, quorum sensing signals and secreted proteins, which play important roles in modulating plant defence responses and determining the outcome of the interactions.