France, champions in 1998, but forced to come through the playoffs, will meet Group E seeds Switzerland as well as Ecuador and Honduras in a mixed-bag group.
Japan, meanwhile, saw themselves lumped in with seeded Colombia, Ivory Coast and Greece in Group C.
After a poignant homage to the late Nelson Mandela, the draw began to the exhilarating sound of samba at the northeastern beach resort of Costa do Sauipe.
The draw build-up had been dominated by news of stadium delays and anti-World Cup campaigners threatening public protests.
Yet Mandela’s death changed the tone as participants remembered how he saw in sport a means of fostering social progress.