Highly pathogenic avian influenza (HPAI) viruses of the H5 A/goose/Guangdong/1/96 lineage can cause severe disease in poultry and wild birds, and occasionally in humans. In recent years, H5 HPAI viruses of this lineage infecting poultry in Asia have spilled over into wild birds and spread via bird migration to countries in Europe, Africa, and North America. In 2016/2017, this spillover resulted in the largest HPAI epidemic on record in Europe and was associated with an unusually high frequency of reassortments between H5 HPAI viruses and cocirculating low-pathogenic avian influenza viruses. Here, we show that the seven main H5 reassortant viruses had various combinations of gene segments 1, 2, 3, 5, and 6. Using detailed time-resolved phylogenetic analysis, most of these gene segments likely originated from wild birds and at dates and locations that corresponded to their hosts´ migratory cycles. However, some gene segments in two reassortant viruses likely originated from domestic anseriforms, either in spring 2016 in east China or in autumn 2016 in central Europe. Our results demonstrate that, in addition to domestic anseriforms in Asia, both migratory wild birds and domestic anseriforms in Europe are relevant sources of gene segments for recent reassortant H5 HPAI viruses. The ease with which these H5 HPAI viruses reassort, in combination with repeated spillovers of H5 HPAI viruses into wild birds, increases the risk of emergence of a reassortant virus that persists in wild bird populations yet remains highly pathogenic for poultry.