Lotus japonicus, like several other legumes, biosynthesizes the cyanogenic a-hydroxynitrile glucosides lotaustralin and linamarin. Upon tissue disruption these compounds are hydrolysed by a specific ß-glucosidase, resulting in the release of hydrogen cyanide. L. japonicus also produces the non-cyanogenic ?- and ß-hydroxynitrile glucosides rhodiocyanoside A and D using a biosynthetic pathway that branches off from lotaustralin biosynthesis. We previously established that BGD2 is the only ß-glucosidase responsible for cyanogenesis in leaves. Here we show that the paralogous BGD4 has the dominant physiological role in rhodiocyanoside degradation. Structural modelling, site-directed mutagenesis, and activity assays establish that a glycine residue (G211) in the aglycone binding site of BGD2 is essential for its ability to hydrolyse the endogenous cyanogenic glucosides. The corresponding valine (V211) in BGD4 narrows the active site pocket, resulting in the exclusion of non-flat substrates such as lotaustralin and linamarin but not of the more planar rhodiocyanosides. Rhodiocyanosides and the BGD4 gene only occur in L. japonicus and a few closely related species associated with the L. corniculatus clade within the Lotus genus. This suggests the evolutionary scenario that substrate specialization for rhodiocyanosides evolved from a promiscuous activity of a progenitor cyanogenic ß-glucosidase resembling BGD2 and required no more than a single amino acid substitution. This article is protected by copyright. All rights reserved.